OptinMon 31 - GLMM

R-Squared for Mixed Effects Models

August 21st, 2019 by

When learning about linear models —that is, regression, ANOVA, and similar techniques—we are taught to calculate an R2. The R2 has the following useful properties:

  • The range is limited to [0,1], so we can easily judge how relatively large it is.
  • It is standardized, meaning its value does not depend on the scale of the variables involved in the analysis.
  • The interpretation is pretty clear: It is the proportion of variability in the outcome that can be explained by the independent variables in the model.

The calculation of the R2 is also intuitive, once you understand the concepts of variance and prediction. (more…)

Regression Diagnostics in Generalized Linear Mixed Models

March 25th, 2019 by

What are the best methods for checking a generalized linear mixed model (GLMM) for proper fit?

This question comes up frequently.

Unfortunately, it isn’t as straightforward as it is for a general linear model.

In linear models the requirements are easy to outline: linear in the parameters, normally distributed and independent residuals, and homogeneity of variance (that is, similar variance at all values of all predictors).


The Difference Between Link Functions and Data Transformations

September 24th, 2018 by

Generalized linear models—and generalized linear mixed models—are called generalized linear because they connect a model’s outcome to its predictors in a linear way. The function used to make this connection is called a link function. Link functions sounds like an exotic term, but they’re actually much simpler than they sound.

For example, Poisson regression (commonly used for outcomes that are counts) makes use of a natural log link function as follows:


Understanding Random Effects in Mixed Models

September 17th, 2018 by

In fixed-effects models (e.g., regression, ANOVA, generalized linear models), there is only one source of random variability. This source of variance is the random sample we take to measure our variables.

It may be patients in a health facility, for whom we take various measures of their medical history to estimate their probability of recovery. Or random variability may come from individual students in a school system, and we use demographic information to predict their grade point averages.


What is the Purpose of a Generalized Linear Mixed Model?

September 10th, 2018 by

If you are new to using generalized linear mixed effects models, or if you have heard of them but never used them, you might be wondering about the purpose of a GLMM.

Mixed effects models are useful when we have data with more than one source of random variability. For example, an outcome may be measured more than once on the same person (repeated measures taken over time).

When we do that we have to account for both within-person and across-person variability. A single measure of residual variance can’t account for both.


Models for Repeated Measures Continuous, Categorical, and Count Data

April 6th, 2015 by

Lately, I’ve gotten a lot of questions about learning how to run models for repeated measures data that isn’t continuous.

Mostly categorical. But once in a while discrete counts.

A typical study is in linguistics or psychology where (more…)