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.
total<-lm(SALARY~EDUC+GENDER+MINORITY)
lower<-lm(SALARY1~EDUC1+GENDER1+MINORITY1)
higher<-lm(SALARY2~EDUC2+GENDER2+MINORITY2)
RSStot<-sum(residuals(total)^2)
RSSlow<-sum(residuals(lower)^2)
RSShig<-sum(residuals(higher)^2)
((576-6)((RSStot-(RSSlow+RSShig)))/(2(RSSlow+RSShig))
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!