Generalized Linear Mixed Model (GLMM)
The GLMM tab fits random intercept models , for data with group structure. It extends GLM by adding random effects. See GLMM Fundamentals for the mathematical background.
For example, when analyzing student test scores from multiple schools, GLMM can estimate the effect of study hours (fixed effect) while accounting for school-level differences (random intercept). Ignoring group structure with GLM leads to underestimated standard errors and inflated significance.
Basic Usage
Opening GLMM
Select Analysis > GLMM (Mixed Model)... from the menu bar.
Setting Up Variables
Dataset selects the dataset to analyze.
Dependent Variable (Y) selects the response variable. Only numeric columns are available.
Fixed Effects (X) selects predictor variables for fixed effects. Only numeric columns are selectable. To use categorical variables, convert them with Dummy Coding first.
Group Variable selects the grouping variable for random intercepts. Categorical (nominal/ordinal) or string columns are available.
Distribution Family selects the distribution family. The same options as GLM:
| Family | Use Case |
|---|---|
| Gaussian (Normal) | Continuous values |
| Binomial (Logistic) | Binary data |
| Poisson (Count) | Count data |
| Gamma | Positive continuous |
Link Function selects the link function. Defaults to the canonical link for the selected family.
Include intercept toggles the intercept term (default: on).
Advanced Options
- Max Iterations: Maximum optimization iterations (default: 100)
- Convergence Tolerance: Convergence threshold (default: 1e-6)
Running the Analysis
Click Run GLMM. The estimation algorithm differs by family (see details). A progress dialog shows the estimation stage.
Understanding Results
Random Effects
Displays variance components for random effects.
| Item | Description |
|---|---|
| Group | Group variable variance and standard deviation |
| Residual | Residual variance and standard deviation (Gaussian only) |
For non-Gaussian families, residual variance is not shown because the dispersion parameter is handled differently per family (Poisson/Binomial fix ; Gamma estimates from profiled deviance).
ICC (Intraclass Correlation Coefficient)
ICC represents the proportion of total variance attributable to between-group differences ( for Gaussian). See GLMM Fundamentals for non-Gaussian computation.
| ICC Range | Interpretation |
|---|---|
| 0 -- 0.05 | Small group differences |
| 0.05 -- 0.20 | Small to moderate group effect |
| 0.20 -- 0.50 | Large group effect |
| 0.50+ | Group differences dominate |
This table is a rough guide for the Gaussian family. For non-Gaussian families, ICC is computed on a latent scale and the interpretation differs (see GLMM Fundamentals). Group size should also be considered (see When to Use GLMM vs GLM).
Fixed Effects
Coefficient table for fixed effects.
| Column | Description |
|---|---|
| Variable | Variable name |
| Estimate | Regression coefficient |
| Std. Error | Standard error (computed via using the Woodbury formula) |
| z value | Wald statistic |
| p-value | Two-sided p-value from the standard normal distribution |
| 95% CI | Wald-based 95% confidence interval |
Coefficient interpretation follows GLM conventions (on the link function scale). See GLM coefficient interpretation for details.
Model Fit
| Metric | Description |
|---|---|
| Deviance | Conditional deviance |
| AIC | Akaike Information Criterion |
| BIC | Bayesian Information Criterion |
For Gaussian, AIC and BIC are REML-based and should not be used to compare models with different fixed effects (details). For non-Gaussian families, AIC/BIC are based on the Laplace-approximated marginal log-likelihood.
BLUP (Random Effect Predictions)
Displays the predicted random intercept (BLUP) for each group. Smaller groups are shrunk more toward the overall mean (shrinkage details).
Saving and Diagnostics
Enter a model name in Model Name and click Save Model to save the model to the project. A diagnostic derived dataset is automatically created on save.
| Column | Description |
|---|---|
fitted_values | Predicted values (fixed + random effects) |
deviance_residuals | Deviance residuals |
pearson_residuals | Pearson residuals |
group_random_effect | Group random intercept (BLUP) |
After saving, Open Model Details and View Diagnostics buttons become available.
Notes
Current Limitations
The current GLMM implementation supports random intercept models () only. Random slopes () and crossed random effects are not supported.
When to Use GLMM vs GLM
When ICC is small, ignoring group structure and using GLM produces nearly identical results. The impact depends not only on ICC but also on group size; the design effect provides a rough guide (see GLMM Fundamentals). When ICC is large, GLM violates the independence assumption between observations, leading to underestimated standard errors. GLMM explicitly models within-group correlation, enabling valid inference.
Automatic Exclusion of Missing Values
Rows containing missing values, non-numeric values, or infinity are automatically excluded. The count and reasons for excluded rows are displayed in the results.
Convergence Issues
If the model fails to converge:
- Increase Max Iterations (100 → 500)
- Relax Convergence Tolerance (1e-6 → 1e-4)
- Very few groups (2-3) can make variance component estimation unstable
- Large scale differences between predictors may cause the GLM initial-value estimation to fail (internal scaling is applied, but extreme cases may still have issues)
See also
- GLM - Generalized linear models without random effects
- GLMM Fundamentals - Mathematical background of random effect models