# Chow Structural Test in R [duplicate]

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

$$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)$$ 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)

## marked as duplicate by kjetil b halvorsen, Peter Flom♦ regression StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); May 5 '17 at 13:28
Go over my answer here. You can use sctest function in package strucchange.