ABSTRACT

In the previous chapter, the multilevel modeling approach to analysis of nested data was introduced along with relevant notations and definitions of random intercepts and coefficients. We will devote this chapter to the introduction of the R packages for fitting multilevel models. In Chapter 1, we provided an overview of the lm() function for linear regression models. As will become apparent, the estimation of multilevel models in R is very similar to estimating single-level linear models. After providing a brief discussion of the two primary R packages for fitting multilevel models for continuous data, we will devote the remainder of the chapter to extended examples applying the principles introduced in Chapter  2 using R.