library(nlme)
data(Bryant2016)
Bryant2016_RML <- lme(fixed = outcome ~ treatment,
random = ~ 1 | school/case,
correlation = corAR1(0, ~ session | school/case),
data = Bryant2016)
varcomp_vcov(Bryant2016_RML, type = "expected")
Bryant2016_RML2 <- lme(fixed = outcome ~ treatment,
random = ~ 1 | school/case,
correlation = corAR1(0, ~ session | school/case),
weights = varIdent(form = ~ 1 | treatment),
data = Bryant2016)
varcomp_vcov(Bryant2016_RML2, separate_variances = TRUE)
Run the code above in your browser using DataLab