Main Content

Mixed Effects

Generalized linear mixed-effects models

A generalized linear mixed-effects (GLME) model includes both fixed and random effects in modeling a response variable. This type of model can account for global and local trends in a data set by including the random effects of a clustering variable. GLME models are a generalization of Linear Mixed-Effects Models (LME) for data where the response variable is not normally distributed. Create a GeneralizedLinearMixedModel object using fitglme.

Classes

GeneralizedLinearMixedModelGeneralized linear mixed-effects model class

Functions

expand all

fitglmeFit generalized linear mixed-effects model
refit Refit generalized linear mixed-effects model
predictPredict response of generalized linear mixed-effects model
randomGenerate random responses from fitted generalized linear mixed-effects model
fittedFitted responses from generalized linear mixed-effects model
fixedEffectsEstimates of fixed effects and related statistics
randomEffectsEstimates of random effects and related statistics
anovaAnalysis of variance for generalized linear mixed-effects model
coefCIConfidence intervals for coefficients of generalized linear mixed-effects model
coefTestHypothesis test on fixed and random effects of generalized linear mixed-effects model
compareCompare generalized linear mixed-effects models
covarianceParametersExtract covariance parameters of generalized linear mixed-effects model
designMatrixFixed- and random-effects design matrices
partialDependenceCompute partial dependence (Since R2020b)
residualsResiduals of fitted generalized linear mixed-effects model
responseResponse vector of generalized linear mixed-effects model
plotPartialDependenceCreate partial dependence plot (PDP) and individual conditional expectation (ICE) plots
plotResidualsPlot residuals of generalized linear mixed-effects model

Topics

  • Fit a Generalized Linear Mixed-Effects Model

    This example shows how to fit a generalized linear mixed-effects model (GLME) to sample data.

  • Generalized Linear Mixed-Effects Models

    Generalized linear mixed-effects (GLME) models describe the relationship between a response variable and independent variables using coefficients that can vary with respect to one or more grouping variables, for data with a response variable distribution other than normal.

  • Wilkinson Notation

    Wilkinson notation provides a way to describe regression and repeated measures models without specifying coefficient values.