A video showing basic usage of the "lme" command (nlme library) in R. In particular, I compare output from the lm() command with that from a call to lme().
Here comes the R code used in this tutorial:
library (nlme)
data(Oats)
str(Oats)
plot(Oats)
model1=lm(yield~Variety*nitro,data=Oats)
summary(model1)
model2=lme(yield~Variety*nitro,data=Oats,random=~1|Block/Variety)
summary(model2)
coef(model1)
coef(model2)
plot(ranef(model2))
plot(model2)