diff --git a/07-the-model-workflow.Rmd b/07-the-model-workflow.Rmd index 3ef47ba..99395ef 100644 --- a/07-the-model-workflow.Rmd +++ b/07-the-model-workflow.Rmd @@ -183,6 +183,8 @@ A number of multilevel models have standardized on a formula specification devis ```r library(lme4) +data(Orthodont, package = "nlme") # load the Orthodont data from the nlme package + lmer(distance ~ Sex + (age | Subject), data = Orthodont) ``` @@ -190,10 +192,6 @@ The effect of this is that each subject will have an estimated intercept and slo The problem is that standard R methods can't properly process this formula: -```{r echo=FALSE} -data(Orthodont, package = "nlme") -``` - ```{r workflows-rand-mm, error=TRUE} model.matrix(distance ~ Sex + (age | Subject), data = Orthodont) ```