Parent engagement = -0.07797

Instruction score = -1.13794

Family involvement = 0.36832

Student attendance = 2.87391

effect("Parent.Engagement.Score:Instruction.Score", interact_read, type="response")
## 
##  Parent.Engagement.Score*Instruction.Score effect
##                        Instruction.Score
## Parent.Engagement.Score        1       30       50       70      100
##                      42 37.12161 30.56570 26.04438 21.52306 14.74109
##                      48 36.78408 34.00593 32.08996 30.17399 27.30004
##                      55 36.39030 38.01953 39.14314 40.26674 41.95216
##                      62 35.99652 42.03313 46.19631 50.35950 56.60427
##                      68 35.65899 45.47336 52.24189 59.01042 69.16322

We can see that the higher parent engagement score (68) and the highest instruction score (100) produces the highest at grade level reading scores (69.16). But the table isn’t exactly linear persay. With the lower parent engagement at 42, the higher the instruction score is, the lower the at grade level reading is. This decrease across higher instruction scores happens when the parent engagement is at 48 as well. This could be because sometimes the best teachers are given the lowest performing students to try and help them succeed, so this could just be circumstantial. When the parent engagement gets to 55 (and from then on to 68), as the instruction score gets higher, the grade 3-5 at reading level score gets higher as well.

plot(effect("Parent.Engagement.Score:Instruction.Score", interact_read, type="response"))

library(sjPlot)
library(sjmisc)
theme_set(theme_sjplot())

plot_model(interact_read, type= "pred", terms= c("Parent.Engagement.Score","Instruction.Score"), mdrt.values = "meansd")

### My no confidence intervals (the shaded area around the lines) are very large. I think this is because I have less data (only 194 observations) and because there is high variability in my data. I do not think parent engagement and instruction score have a strong relationship (correlation coefficient = 0.34), that’s to say I do not think parent engagement matters more if the instruction score of the teacher is higher and vice versa.

I am adding the yearly_progress variable which was called the “Adequate Yearly Progress Made” variable to the regression because knowing if the school made adequate yearly progress may tell us if students are more likely to be at grade level for reading in grades 3-5 in addition to parent engagement, instruction score, and student attendance. I would assume students that are at schools that are/have made adequate yearly progress will have higher levels of grade 3-5 reading scores/reading at grade level.

interact_progress<-lm(GR3_5_readlevel ~ Parent.Engagement.Score*Instruction.Score+student_attendance+yearly_progress, data= dataschools2)

summary(interact_progress)
## 
## Call:
## lm(formula = GR3_5_readlevel ~ Parent.Engagement.Score * Instruction.Score + 
##     student_attendance + yearly_progress, data = dataschools2)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -29.405  -6.776  -1.017   6.514  44.852 
## 
## Coefficients:
##                                             Estimate Std. Error t value
## (Intercept)                               -2.748e+02  5.432e+01  -5.060
## Parent.Engagement.Score                    1.045e+00  6.241e-01   1.674
## Instruction.Score                          4.436e-02  5.326e-01   0.083
## student_attendance                         2.663e+00  5.055e-01   5.268
## yearly_progressYes                         2.574e+01  2.594e+00   9.926
## Parent.Engagement.Score:Instruction.Score -5.965e-04  1.062e-02  -0.056
##                                           Pr(>|t|)    
## (Intercept)                               9.94e-07 ***
## Parent.Engagement.Score                     0.0958 .  
## Instruction.Score                           0.9337    
## student_attendance                        3.75e-07 ***
## yearly_progressYes                         < 2e-16 ***
## Parent.Engagement.Score:Instruction.Score   0.9553    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 11.82 on 188 degrees of freedom
## Multiple R-squared:  0.6291, Adjusted R-squared:  0.6193 
## F-statistic: 63.78 on 5 and 188 DF,  p-value: < 2.2e-16

Parent engagement = 1.045

Instruction score = 0.04436

student attendance = 2.663

yearly progress = 25.74

Parent.Engagement.Score:Instruction.Score = −0.0005965

If a student comes from a school that had “Yes” their school did make adequate yearly progress (for a one unit increase in yearly progress), then the reading level increases by 25.74.

dataschools2$yearly_progress<-as.factor(dataschools2$yearly_progress)
dataschools2$predicted_progress<-predict(interact_progress)
dataschools2$residuals_progress<-residuals(interact_progress)


plot(dataschools2$predicted_progress,dataschools2$residuals_progress, col=dataschools2$yearly_progress)

coeftest(interact_progress, vcov=vcovHC(interact_progress, type="HC1"))
## 
## t test of coefficients:
## 
##                                              Estimate  Std. Error t value
## (Intercept)                               -2.7484e+02  4.8905e+01 -5.6199
## Parent.Engagement.Score                    1.0447e+00  7.3318e-01  1.4249
## Instruction.Score                          4.4365e-02  6.5980e-01  0.0672
## student_attendance                         2.6632e+00  4.4579e-01  5.9741
## yearly_progressYes                         2.5743e+01  3.0963e+00  8.3142
## Parent.Engagement.Score:Instruction.Score -5.9647e-04  1.3559e-02 -0.0440
##                                            Pr(>|t|)    
## (Intercept)                               6.809e-08 ***
## Parent.Engagement.Score                      0.1558    
## Instruction.Score                            0.9465    
## student_attendance                        1.137e-08 ***
## yearly_progressYes                        1.823e-14 ***
## Parent.Engagement.Score:Instruction.Score    0.9650    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
residuals_sdprogress<-dataschools2 %>%
  group_by(yearly_progress)%>%
  summarise(residuals_sdprogress=sd(residuals_progress))%>%
  arrange(residuals_sdprogress)

absolute_residualprogress<- dataschools2 %>%
  group_by(yearly_progress)%>%
  summarise(absolute_residual_avgprogress=mean(abs(residuals_progress)))%>%
  arrange(absolute_residual_avgprogress)

The standard deviations of “yes” (15.4) and “no” (10.8) adequate yearly progress made are far apart and the means of the absolute residuals are also very different (yes= 11.5 and no=8.26)- so since these values are very different, along with the randomness of the plot, I believe heterskedasticity is present in my data (though I’m not sure how strong it is since I do not have many observations and there are only two options, “yes” and “no” unlike of the example from the video where there are thousands of observations and ten states.)

HC1

vcov(interact_progress, type="HC1")
##                                            (Intercept) Parent.Engagement.Score
## (Intercept)                               2950.3946404           -16.753052172
## Parent.Engagement.Score                    -16.7530522             0.389481691
## Instruction.Score                          -14.6769179             0.305314924
## student_attendance                         -22.6486981            -0.025638035
## yearly_progressYes                          23.1544132             0.069961720
## Parent.Engagement.Score:Instruction.Score    0.3011668            -0.006177297
##                                           Instruction.Score student_attendance
## (Intercept)                                   -14.676917862      -2.264870e+01
## Parent.Engagement.Score                         0.305314924      -2.563803e-02
## Instruction.Score                               0.283640341      -6.398135e-03
## student_attendance                             -0.006398135       2.555706e-01
## yearly_progressYes                              0.219077771      -2.847891e-01
## Parent.Engagement.Score:Instruction.Score      -0.005628249       5.397137e-05
##                                           yearly_progressYes
## (Intercept)                                     23.154413237
## Parent.Engagement.Score                          0.069961720
## Instruction.Score                                0.219077771
## student_attendance                              -0.284789118
## yearly_progressYes                               6.726717511
## Parent.Engagement.Score:Instruction.Score       -0.004651338
##                                           Parent.Engagement.Score:Instruction.Score
## (Intercept)                                                            3.011668e-01
## Parent.Engagement.Score                                               -6.177297e-03
## Instruction.Score                                                     -5.628249e-03
## student_attendance                                                     5.397137e-05
## yearly_progressYes                                                    -4.651338e-03
## Parent.Engagement.Score:Instruction.Score                              1.128368e-04
coeftest(interact_progress, vcov=vcovHC(interact_progress, type="HC1"))
## 
## t test of coefficients:
## 
##                                              Estimate  Std. Error t value
## (Intercept)                               -2.7484e+02  4.8905e+01 -5.6199
## Parent.Engagement.Score                    1.0447e+00  7.3318e-01  1.4249
## Instruction.Score                          4.4365e-02  6.5980e-01  0.0672
## student_attendance                         2.6632e+00  4.4579e-01  5.9741
## yearly_progressYes                         2.5743e+01  3.0963e+00  8.3142
## Parent.Engagement.Score:Instruction.Score -5.9647e-04  1.3559e-02 -0.0440
##                                            Pr(>|t|)    
## (Intercept)                               6.809e-08 ***
## Parent.Engagement.Score                      0.1558    
## Instruction.Score                            0.9465    
## student_attendance                        1.137e-08 ***
## yearly_progressYes                        1.823e-14 ***
## Parent.Engagement.Score:Instruction.Score    0.9650    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Parent.Engagement.Score 1.0447e+00

Instruction.Score 4.4365e-02

student_attendance 2.6632e+00

yearly_progressYes 2.5743e+01

###Parent.Engagement.Score:Instruction.Score -5.9647e-04

HC3

coeftest(interact_progress, vcov=vcovHC(interact_progress, type="HC3"))
## 
## t test of coefficients:
## 
##                                              Estimate  Std. Error t value
## (Intercept)                               -2.7484e+02  5.2353e+01 -5.2498
## Parent.Engagement.Score                    1.0447e+00  8.0948e-01  1.2906
## Instruction.Score                          4.4365e-02  7.5098e-01  0.0591
## student_attendance                         2.6632e+00  4.6149e-01  5.7709
## yearly_progressYes                         2.5743e+01  3.2276e+00  7.9760
## Parent.Engagement.Score:Instruction.Score -5.9647e-04  1.5396e-02 -0.0387
##                                            Pr(>|t|)    
## (Intercept)                               4.091e-07 ***
## Parent.Engagement.Score                      0.1984    
## Instruction.Score                            0.9530    
## student_attendance                        3.202e-08 ***
## yearly_progressYes                        1.438e-13 ***
## Parent.Engagement.Score:Instruction.Score    0.9691    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Parent.Engagement.Score 1.0447e+00

Instruction.Score 4.4365e-02

student_attendance 2.6632e+00

yearly_progressYes 2.5743e+01

Parent.Engagement.Score:Instruction.Score -5.9647e-04

Traditional

summary(interact_progress)
## 
## Call:
## lm(formula = GR3_5_readlevel ~ Parent.Engagement.Score * Instruction.Score + 
##     student_attendance + yearly_progress, data = dataschools2)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -29.405  -6.776  -1.017   6.514  44.852 
## 
## Coefficients:
##                                             Estimate Std. Error t value
## (Intercept)                               -2.748e+02  5.432e+01  -5.060
## Parent.Engagement.Score                    1.045e+00  6.241e-01   1.674
## Instruction.Score                          4.436e-02  5.326e-01   0.083
## student_attendance                         2.663e+00  5.055e-01   5.268
## yearly_progressYes                         2.574e+01  2.594e+00   9.926
## Parent.Engagement.Score:Instruction.Score -5.965e-04  1.062e-02  -0.056
##                                           Pr(>|t|)    
## (Intercept)                               9.94e-07 ***
## Parent.Engagement.Score                     0.0958 .  
## Instruction.Score                           0.9337    
## student_attendance                        3.75e-07 ***
## yearly_progressYes                         < 2e-16 ***
## Parent.Engagement.Score:Instruction.Score   0.9553    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 11.82 on 188 degrees of freedom
## Multiple R-squared:  0.6291, Adjusted R-squared:  0.6193 
## F-statistic: 63.78 on 5 and 188 DF,  p-value: < 2.2e-16

Parent.Engagement.Score 1.045e+00

Instruction.Score 4.436e-02

student_attendance 2.663e+00

yearly_progressYes 2.574e+01

Parent.Engagement.Score:Instruction.Score -5.965e-04

The traditional errors, HC1, and HC3 errors are pretty much the same. This leads me to believe that my original thoughts from my original regression from HW one that higher parent engagement leads to higher at grade level reading scores and also confirms what I learned orginally that instruction score and parent engagement score are not positively correlated, so when the parent engagment score is higher, there may be less of a need for a higher instruction score (less teacher attention/teacher does not need to focus as much attention on student that has a lot of support at home). This also confirms what I learned in my multivariate regression from HW 1 that student attendance plays the biggest role in increasing at grade level scores. From adding the yearly progress variable, I learned that making adequate yearly progress will predict a much higher at grade level reading score in my data.