Multilevel models are statistical models of parameters that vary at more than one level. An example could be a model of student performance that contains measures for individual students as well as measures for classrooms within which the students are grouped. These models are also known as hierarchical linear models, linear mixed-effect models, mixed models, nested data models, random coefficient, random-effects models, random parameter models, or split-plot designs. These models can be seen as generalizations of linear models (in particular, linear regression), although they can also extend to non-linear models. These models became much more popular after sufficient computing power and software became available. Multilevel models are particularly appropriate for research designs where data for participants are organized at more than one level (i.e., nested data). The units of analysis are usually individuals (at a lower level) who are nested within contextual/aggregate units (at a higher level). While the lowest level of data in multilevel models is usually an individual, repeated measurements of individuals may also be examined. As such, multilevel models provide an alternative type of analysis for univariate or multivariate analysis of repeated measures. Individual differences in growth curves may be examined. Furthermore, multilevel models can be used as an alternative to ANCOVA, where scores on the dependent variable are adjusted for covariates (e.g. individual differences) before testing treatment differences. Multilevel models are able to analyze these experiments without the assumptions of homogeneity-of-regression slopes that is required by ANCOVA. Multilevel models can be used on data with many levels, although 2-level models are the most common and the rest of this article deals only with these. The dependent variable must be examined at the lowest level of analysis.
Level 1 regression equation When there is a single level 1 independent variable, the level 1 model is
Y i j = β 0 j + β 1 j X i j + e i j {\displaystyle Y_{ij}=\beta _{0j}+\beta _{1j}X_{ij}+e_{ij}} .
Y i j {\displaystyle Y_{ij}} refers to the score on the dependent variable for an individual observation at Level j (subscript i refers to individual case, subscript j refers to the group).
X i j {\displaystyle X_{ij}} refers to the Level 1 predictor.
β 0 j {\displaystyle \beta _{0j}} refers to the intercept of the dependent variable for group j.
β 1 j {\displaystyle \beta _{1j}} refers to the slope for the relationship in group j (Level 2) between the Level 1 predictor and the dependent variable.
e i j {\displaystyle e_{ij}} refers to the random errors of prediction for the Level 1 equation (it is also sometimes referred to as r i j {\displaystyle r_{ij}} ).
e i j ∼ N ( 0 , σ 1 2 ) {\displaystyle e_{ij}\sim {\mathcal {N}}(0,\sigma _{1}^{2})}
At Level 1, both the intercepts and slopes in the groups can be either fixed (meaning that all groups have the same values, although in the real world this would be a rare occurrence), non-randomly varying (meaning that the intercepts and/or slopes are predictable from an independent variable at Level 2), or randomly varying (meaning that the intercepts and/or slopes are different in the different groups, and that each have their own overall mean and variance). When there are multiple level 1 independent variables, the model can be expanded by substituting vectors and matrices in the equation. When the relationship between the response Y i j {\displaystyle Y_{ij}} and predictor X i j {\displaystyle X_{ij}} can not be described by the linear relationship, then one can find some non linear functional relationship between the response and predictor, and extend the model to nonlinear mixed-effects model. For example, when the response Y i j {\displaystyle Y_{ij}} is the cumulative infection trajectory of the i {\displaystyle i} -th country, and X i j {\displaystyle X_{ij}} represents the j {\displaystyle j} -th time points, then the ordered pair ( X i j , Y i j ) {\displaystyle (X_{ij},Y_{ij})} for each country may show a shape similar to logistic function.
Level 2 regression equation The dependent variables are the intercepts and the slopes for the independent variables at Level 1 in the groups of Level 2.
… excerpt ends here. Continue reading the full article.


![Multilevel model: Bayesian research cycle using Bayesian nonlinear mixed effects model: (a) standard research cycle and (b) Bayesian-specific workflow.[19]](https://upload.wikimedia.org/wikipedia/commons/thumb/1/12/Bayesian_research_cycle.png/1280px-Bayesian_research_cycle.png?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail)
