This function fits to a numerical vector sorted in the non decreasing order two simple linear regressions and returns the index corresponding to the estimated change between the two regression models.
This function fits to a numerical vector sorted in the non decreasing order two simple linear regressions and returns the index corresponding to the estimated change between the two regression models.
slope_change(Y)
Arguments
Y: numerical vector sorted in the non decreasing order.
Returns
K the index corresponding to the estimated change between the two linear regression models.