I know this is kinda stupid question to ask here but just to make sure that I am doing this correctly, here it is anyway:

Consider the following equation resulted from segmented regression: $$\hat y_i = \begin{cases} \hat\beta_1 x_i + (\hat\beta_0 - \hat\beta_1 \cdot c) &\text{if } x_i \le c \\ \hat\beta_2x_i + (\hat\beta_0 - \hat\beta_2 \cdot c)&\text{else}\end{cases}$$ where $c$ is the break point and $i = 1,2,\ldots n$. And according to this, standard error of linear regression coefficient can be calculated as follows: $$\hat y_i = \hat\beta x_i + b,\ i = 1,2,\ldots n\\ \widehat{\text{se}}(\hat{\beta}) = \sqrt{\frac{\frac{1}{n-2} \sum_i \hat{\epsilon}_i^2}{\sum_i (x_i - \bar{x})^2}} $$ Now if I want to calculate the standard error of $\hat\beta_1$ from segmented regression, will it be this: $$\widehat{\text{se}}(\hat\beta_1) = \sqrt{\frac{\frac{1}{N-2} \sum_i \hat{\epsilon}_i^2}{\sum_i (x_i - \bar{x})^2}}$$ where $i$ is index of $x_i$ such that $x_i \le c$ and $N$ is number of $x_i$ such that $x_i \le c$? Or do I have to use all $i$ (i.e the whole data set) to calculate standard error of $\hat\beta_1$?

  • $\begingroup$ The fitted parameter does not apply to the entire data set, so the associated standard error also does not apply to the entire data set. $\endgroup$ – James Phillips Apr 9 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.