Our regressions regress each of the outcome variables on covariates, gr4, targetcohort, and the interaction of gr4 by targetcohort covariates are hisp black tworaces otherrace boy ell frlp sped tag teacher nesting variable is teacher teacherXyear nesting variable (class) is teachyear student variable is student (or stmath_user_id for a string) outcome variables are minutes levelcount progress levelave springpostave expect enjoy util import cost

After main effects, we’ve done three-way interactions between gr4Xtargetcohort and frlp and ell in separate models

Each student has 1-2 years of data

# library(googlesheets4)
library(tidyverse)
library(lme4)

# d <- googlesheets4::read_sheet("https://docs.google.com/spreadsheets/d/1AM5IcpHEPQg6L2pxjlwku-0jTiEa7PU0--fRngzBhzo/edit#gid=1404402625")
# write_csv(d, "teya-cc.csv")
d <- read_csv("teya-cc.csv")

Plots

hist(d$minutes)

hist(d$levelcount)

hist(d$progress)

hist(d$levelave)

hist(d$springpostave)

hist(d$expect)

hist(d$enjoy)

hist(d$util)

hist(d$import)

hist(d$cost)

Minutes

Null

m <- lmer(minutes ~ 1 + (1|teacher) + (1|student), data = d)

sjPlot::tab_model(m)
  minutes
Predictors Estimates CI p
(Intercept) 2633.11 2575.16 – 2691.06 <0.001
Random Effects
σ2 430892.53
τ00 student 117786.49
τ00 teacher 469222.26
ICC 0.58
N teacher 642
N student 5453
Observations 10906
Marginal R2 / Conditional R2 0.000 / 0.577
performance::icc(m, by_group = TRUE)
## # ICC by Group
## 
## Group   |   ICC
## ---------------
## student | 0.116
## teacher | 0.461

Full

m1 <- lmer(minutes ~ 1 + gr4 + targetcohort + gr4:targetcohort +
              hisp + black + tworaces + otherrace + boy + ell + frlp + sped + tag +
              (1|teacher) + (1|student), data = d)

sjPlot::tab_model(m1)
  minutes
Predictors Estimates CI p
(Intercept) 3061.28 2981.81 – 3140.76 <0.001
gr4 -319.05 -410.45 – -227.66 <0.001
targetcohort -161.85 -208.72 – -114.99 <0.001
hisp -32.18 -77.38 – 13.02 0.163
black 31.09 -12.34 – 74.51 0.161
tworaces -23.34 -84.82 – 38.14 0.457
otherrace 13.46 -61.92 – 88.84 0.726
boy -118.54 -148.61 – -88.48 <0.001
ell -27.11 -86.14 – 31.92 0.368
frlp -42.69 -76.81 – -8.56 0.014
sped -185.87 -234.59 – -137.16 <0.001
tag -137.72 -207.83 – -67.62 <0.001
gr4 * targetcohort -396.46 -460.53 – -332.39 <0.001
Random Effects
σ2 416323.12
τ00 student 97862.25
τ00 teacher 366466.75
ICC 0.53
N teacher 642
N student 5451
Observations 10902
Marginal R2 / Conditional R2 0.120 / 0.584
performance::icc(m1, by_group = TRUE)
## # ICC by Group
## 
## Group   |   ICC
## ---------------
## student | 0.111
## teacher | 0.416

Level count

Null

m <- lmer(levelcount ~ 1 + (1|teacher) + (1|student), data = d)

sjPlot::tab_model(m)
  levelcount
Predictors Estimates CI p
(Intercept) 181.55 174.94 – 188.17 <0.001
Random Effects
σ2 10981.34
τ00 student 1546.50
τ00 teacher 5383.73
ICC 0.39
N teacher 636
N student 5422
Observations 9856
Marginal R2 / Conditional R2 0.000 / 0.387
performance::icc(m, by_group = TRUE)
## # ICC by Group
## 
## Group   |   ICC
## ---------------
## student | 0.086
## teacher | 0.301

Full

m1 <- lmer(levelcount ~ 1 + gr4 + targetcohort + gr4:targetcohort +
              hisp + black + tworaces + otherrace + boy + ell + frlp + sped + tag +
              (1|teacher) + (1|student), data = d)

sjPlot::tab_model(m1)
  levelcount
Predictors Estimates CI p
(Intercept) 225.17 215.25 – 235.09 <0.001
gr4 -72.31 -83.35 – -61.27 <0.001
targetcohort -37.47 -44.52 – -30.43 <0.001
hisp 4.30 -2.72 – 11.31 0.230
black 9.74 3.02 – 16.46 0.005
tworaces -4.71 -14.22 – 4.81 0.332
otherrace -8.30 -20.01 – 3.41 0.165
boy -3.45 -8.12 – 1.22 0.148
ell 13.10 4.21 – 21.99 0.004
frlp 3.48 -1.77 – 8.74 0.194
sped 16.34 8.83 – 23.85 <0.001
tag -40.88 -51.98 – -29.78 <0.001
gr4 * targetcohort -12.78 -23.17 – -2.39 0.016
Random Effects
σ2 10845.04
τ00 student 1333.09
τ00 teacher 3157.26
ICC 0.29
N teacher 636
N student 5420
Observations 9854
Marginal R2 / Conditional R2 0.118 / 0.376
performance::icc(m1, by_group = TRUE)
## # ICC by Group
## 
## Group   |   ICC
## ---------------
## student | 0.087
## teacher | 0.206

Progress

Null

m <- lmer(progress ~ 1 + (1|teacher) + (1|student), data = d)

sjPlot::tab_model(m)
  progress
Predictors Estimates CI p
(Intercept) 0.70 0.69 – 0.71 <0.001
Random Effects
σ2 0.03
τ00 student 0.04
τ00 teacher 0.02
ICC 0.66
N teacher 642
N student 5453
Observations 10906
Marginal R2 / Conditional R2 0.000 / 0.663
performance::icc(m, by_group = TRUE)
## # ICC by Group
## 
## Group   |   ICC
## ---------------
## student | 0.422
## teacher | 0.241

Full

m1 <- lmer(progress ~ 1 + gr4 + targetcohort + gr4:targetcohort +
              hisp + black + tworaces + otherrace + boy + ell + frlp + sped + tag +
              (1|teacher) + (1|student), data = d)

sjPlot::tab_model(m1)
  progress
Predictors Estimates CI p
(Intercept) 0.77 0.75 – 0.79 <0.001
gr4 -0.03 -0.05 – -0.01 0.013
targetcohort -0.02 -0.04 – -0.01 0.003
hisp -0.03 -0.05 – -0.01 0.001
black -0.04 -0.05 – -0.02 <0.001
tworaces -0.02 -0.04 – 0.01 0.147
otherrace 0.03 0.00 – 0.06 0.036
boy 0.06 0.05 – 0.07 <0.001
ell -0.01 -0.03 – 0.02 0.641
frlp -0.03 -0.05 – -0.02 <0.001
sped -0.15 -0.17 – -0.13 <0.001
tag 0.13 0.10 – 0.16 <0.001
gr4 * targetcohort -0.08 -0.10 – -0.06 <0.001
Random Effects
σ2 0.03
τ00 student 0.03
τ00 teacher 0.02
ICC 0.64
N teacher 642
N student 5451
Observations 10902
Marginal R2 / Conditional R2 0.089 / 0.669
performance::icc(m1, by_group = TRUE)
## # ICC by Group
## 
## Group   |   ICC
## ---------------
## student | 0.414
## teacher | 0.222