To Start R: Click on the R icon
If no R icon, go to Start and then All Programs to find R
Here is a description of the data: classroom_des.txt
What does the data look like and what is read.csv?
Here is the data classroom.csv
Read the data into the class object and also,
> library(nlme)
> help(lme)
What is the default method?
We will use the textbook web page , Click on Chapter 4 and then the R Syntax for Descriptive Statistics
Let's make boxplots for (Figure 4.2).
What do you notice?
Recall, Table 4.1 has Level of Data: Level 1 is Student, Level 2 is Classroom, Level 3 is School
Let's look at the Model Analysis R Syntax:
Step 1: Model 4.1 (fixed intercept, random intercept for schools (Level 3) and
classrooms (Level 2) within schools)
Test for random intercepts for classrooms within schools, what do you conclude?
Step 2: Fixed effects of student-level covariates added to Level 1 Model (Model 4.2)
Test for these fixed effects, what do you conclude? Remember tests with REML are
only for same fixed effects!
Step 3: Fixed effects of classroom-level covariates added to Level 2 Model (Model 4.3)
Test for these, what do you conclude?
Step 4: Fixed effects of school-level covariate added to Level 3 Model (Model 4.4)
Test for these, what do you conclude?
What is your final model?
Model diagnostics are in the R Syntax for Final Model Diagnostics!