I'm learning how to run multilevel models in R.
I tried the analysis of variance model, AKA, the intercept-only model.
fit<lme(post_test~1,random=~1|school,data=mySASData,control=list(opt="optim"))
summary(fit)
anova(fit)
VarCorr(fit)
summary(fit)
I run this in SAS and get the same results. I didn't get the same degree of freedom.
proc glimmix data=sashlm.core_2014_4_years;
class school;
model post_test=/solution ddfm=kr dist=normal link=identity;
random intercept /subject=school;
run;