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 Yij=β0j+β1jXij+eij.
Yij 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). Xij refers to the Level 1 predictor. β0j refers to the intercept of the dependent variable for group j. β1j refers to the slope for the relationship in group j (Level 2) between the Level 1 predictor and the dependent variable. eij refers to the random errors of prediction for the Level 1 equation (it is also sometimes referred to as rij). eij∼𝒩(0,σ12) 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 Yij and predictor Xij 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 Yij is the cumulative infection trajectory of the i-th country, and Xij represents the j-th time points, then the ordered pair (Xij,Yij) 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. u0j∼𝒩(0,σ22) u1j∼𝒩(0,σ32) β0j=γ00+γ01wj+u0j β1j=γ10+γ11wj+u1j
γ00 refers to the overall intercept. This is the grand mean of the scores on the dependent variable across all the groups when all the predictors are equal to 0. γ10 refers to the average slope between the dependent variable and the Level 1 predictor. wj refers to the Level 2 predictor. γ01 and γ11 refer to the effect of the Level 2 predictor on the Level 1 intercept and slope respectively. u0j refers to the deviation in group j from the overall intercept. u1j refers to the deviation in group j from the average slope between the dependent variable and the Level 1 predictor.
Types of models Before conducting a multilevel model analysis, a researcher must decide on several aspects, including which predictors are to be included in the analysis, if any. Second, the researcher must decide whether parameter values (i.e., the elements that will be estimated) will be fixed or random. Fixed parameters are composed of a constant over all the groups, whereas a random parameter has a different value for each of the groups. Additionally, the researcher must decide whether to employ a maximum likelihood estimation or a restricted maximum likelihood estimation type.
Random intercepts model A random intercepts model is a model in which intercepts are allowed to vary, and therefore, the scores on the dependent variable for each individual observation are predicted by the intercept that varies across groups. This model assumes that slopes are fixed (the same across different contexts). In addition, this model provides information about intraclass correlations, which are helpful in determining whether multilevel models are required in the first place.
Random slopes model A random slopes model is a model in which slopes are allowed to vary according to a correlation matrix, and therefore, the slopes are different across grouping variable such as time or individuals. This model assumes that intercepts are fixed (the same across different contexts).
Random intercepts and slopes model A model that includes both random intercepts and random slopes is likely the most realistic type of model, although it is also the most complex. In this model, both intercepts and slopes are allowed to vary across groups, meaning that they are different in different contexts.
… 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://thumb.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)