I have a question concerning a task in which I should test, with the help of a suitable dummy variable design, whether the experience for men and women at the same educational level (= dummy variable) has a different effect on the log(wage).
The null hypothesis is that both interaction effects Erf * Weibl and Erf2 * Weibl are simultaneously equal to Zero.
HBA stands for the highest level of education, that is the dummy variable.
Weibl stand for women and Erf means experiance.
library("foreign")
lm.stdl_r <- lm(log(StdL) ~ HBA + I(Erf*Weibl) + I(Erf^2*Weibl), data = subset(stdl_44))
SSR_r <- deviance(lm.stdl_r)
SSR_r # SSR for the restricted modell
lm.stdl_u1 <- lm(log(StdL) ~ HBA + I(Erf*Weibl) + I(Erf^2*Weibl), data = subset(stdl_44, Weibl == 1))
SSR_u1 <- deviance(lm.stdl_u1) # SSR fuer nicht restringiertes Modell
lm.stdl_u2 <- lm(log(StdL) ~ HBA + I(Erf*Weibl) + I(Erf^2*Weibl), data = subset(stdl_44, Weibl == 0))
SSR_u2 <- deviance(lm.stdl_u2) # SSR for unrestricted model
SSR_u <- SSR_u1 + SSR_u2
SSR_u # SSR for the whole unrestricted model
With this code I don't get the wright answer and I am not able to find my mistake...
Thank you very much in advance for your help!
r_rookie