From 64de6c7cbe72ea05752aa9b704474a32cdeac521 Mon Sep 17 00:00:00 2001 From: Catherine Kim Date: Tue, 5 Jul 2022 17:07:38 +1000 Subject: [PATCH] import Orthodont data As written, the text seems to imply that the Orthodont data is from the lme4 package. Suggest adding in the line reading in the data from the nlme package before the first linear model and including it in the text to avoid confusion. --- 07-the-model-workflow.Rmd | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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) ```