library(nlme)
data(Bryant2016, package = "lmeInfo")
Bryant2016_RML1 <- lme(fixed = outcome ~ treatment,
random = ~ 1 | school/case,
correlation = corAR1(0, ~ session | school/case),
data = Bryant2016)
Bryant2016_g1 <- g_mlm(Bryant2016_RML1, p_const = c(0,1), r_const = c(1,1,0,1),
infotype = "expected")
print(Bryant2016_g1)
summary(Bryant2016_g1)
Bryant2016_RML2 <- lme(fixed = outcome ~ treatment,
random = ~ 1 | school/case,
correlation = corAR1(0, ~ session | school/case),
weights = varIdent(form = ~ 1 | treatment),
data = Bryant2016)
Bryant_g <- g_mlm(Bryant2016_RML2, p_const = c(0,1), r_const = c(1,1,0,0,1))
Bryant_g_baseline <- g_mlm(Bryant2016_RML2,
p_const = c(0,1),
r_const = c(1,1,0,1,0),
separate_variances = TRUE)
Bryant_g_treatment <- g_mlm(Bryant2016_RML2,
p_const = c(0,1),
r_const = c(1,1,0,0,1),
separate_variances = TRUE)
print(Bryant_g)
print(Bryant_g_baseline)
print(Bryant_g_treatment)
Run the code above in your browser using DataLab