Because we have centered all of our variables, the intercept term in the main-effect only model tells us the expected reading score (54)for the “average” child (i.e. a child who comes from a family with the average income in the sample, a child having the average age of children in the sample, a child with parents having the average score on the home97 scale) whose mothers did NOT participate in WIC. Given the contrast coding for RACE, the intercept is the unweighted mean for the two groups (Black and White).
Run two regressions: one without interaction terms (main effects only) and one regression with interaction terms, controlling for incomeC, ageC, and ageC2
Main Effects Model
For a model without interaction, we assume that the effect of HOME97 on read97 is the same regardless of whether children’s mother participated in the WIC program.
\[\hat{read97}= \alpha + \beta_1 {incomeC} + \beta_2{ageC} + \beta_3{ageC2} + \beta_4{homeC} + \beta_5{WICpreg} + \epsilon\]
lm1<-lm(read97~incomeC + ageC + ageC2 + homeC + WICpreg, data=goodMini)
summary(lm1)
##
## Call:
## lm(formula = read97 ~ incomeC + ageC + ageC2 + homeC + WICpreg,
## data = goodMini)
##
## Residuals:
## Min 1Q Median 3Q Max
## -41.78 -6.79 0.51 7.54 45.68
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 54.4373 0.5306 102.59 < 0.0000000000000002 ***
## incomeC 1.1886 0.2980 3.99 0.000070 ***
## ageC 9.6368 0.2372 40.64 < 0.0000000000000002 ***
## ageC2 -1.3040 0.0866 -15.05 < 0.0000000000000002 ***
## homeC 1.0307 0.1201 8.58 < 0.0000000000000002 ***
## WICpregparticipant -3.0998 0.7441 -4.17 0.000033 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11 on 1250 degrees of freedom
## Multiple R-squared: 0.67, Adjusted R-squared: 0.669
## F-statistic: 508 on 5 and 1250 DF, p-value: <0.0000000000000002
Interaction Model: Include a two-way interaction term of HOME x WICpreg
For a model with interaction, we want to examine if HOME97 effects on read97 depend on WICpreg.
Model with interactions: fit \(read97\) vs \(homeC\) by \(WICpreg\).
\[\hat{read97}= \alpha + \beta_1 {incomeC} + \beta_2{ageC} + \beta_3{ageC2} + \beta_4{homeC} + \beta_5{WICpreg} + \beta_6{WICpreg \cdot homeC} + \epsilon\]
# We can include both main effects of homeC and WICpreg, as well as the interaction term using `homeC*WICpreg`:
lm2<-lm(read97~incomeC + ageC + ageC2 + homeC*WICpreg, data=goodMini)
summary(lm2)
##
## Call:
## lm(formula = read97 ~ incomeC + ageC + ageC2 + homeC * WICpreg,
## data = goodMini)
##
## Residuals:
## Min 1Q Median 3Q Max
## -42.69 -6.77 0.37 7.57 44.22
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 54.0801 0.5372 100.67 < 0.0000000000000002
## incomeC 1.1431 0.2968 3.85 0.00012
## ageC 9.6951 0.2366 40.98 < 0.0000000000000002
## ageC2 -1.3092 0.0862 -15.18 < 0.0000000000000002
## homeC 1.3827 0.1540 8.98 < 0.0000000000000002
## WICpregparticipant -3.5414 0.7504 -4.72 0.0000026
## homeC:WICpregparticipant -0.8306 0.2290 -3.63 0.00030
##
## (Intercept) ***
## incomeC ***
## ageC ***
## ageC2 ***
## homeC ***
## WICpregparticipant ***
## homeC:WICpregparticipant ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11 on 1249 degrees of freedom
## Multiple R-squared: 0.674, Adjusted R-squared: 0.672
## F-statistic: 430 on 6 and 1249 DF, p-value: <0.0000000000000002