This question already has an answer here:

I am sitting on a pile of data concerning wages at a local company and other information, such as the gender, whether the person in question belongs to a minority group etc. What I would like to investigate is whether an additional year of education gives the same relative increase in wages for lower and higher education. For this purpose, I have divided the original data into two subcategories; one group with at most 12 years of education and the other with 13 or more years of education. What I would like to perform is a Chow test of structural change of the form

\begin{equation} F=\frac{\frac{(RSS-(RSS_{\text{lower}}+RSS_{\text{higher}}))}{2}}{\frac{RSS_{\text{lower}}+RSS_{\text{higher}}}{n-2k}}=\frac{(n-2k)((RSS-(RSS_{\text{lower}}+RSS_{\text{higher}}))}{2(RSS_{\text{lower}}+RSS_{\text{higher}})} \sim F(k,n-2k) \end{equation} where $n$ is the total number of observations and $k$ is the number of explanatory variables.

Clearly, I could simply calculate the $RSS:$s directly and then construct $F$ explicitly.


Nevertheless, I am sure there must be a way to do this directly in R. How exactly would that be? I would truly appreciate any enlightenment from any kindhearted spirit. Cheers to all!


marked as duplicate by kjetil b halvorsen, Peter Flom regression May 5 '17 at 13:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Go over my answer here. You can use sctest function in package strucchange.


Not the answer you're looking for? Browse other questions tagged or ask your own question.