GLLAMM Programs gllamm gllapred gllasim


The program gllamm runs in the statistical package Stata and estimates GLLAMMs (Generalized Linear Latent And Mixed Models) by maximum likelihood (see help gllamm after installation).


gllamm maximises the marginal log-likelihood using Stata's version of the Newton Raphson Algorithm (ml with method d0). In the case of discrete random effects or factors, the marginal log-likelihood is evaluated exactly whereas numerical integration is used for continuous (multivariate) normal random effects or factors. Two methods are available for numerical integration: Quadrature or adaptive quadrature. In both cases it is essential to make sure that a sufficient number of quadrature points has been used by comparing solutions with different numbers quadrature points. In most cases adaptive quadrature will perform better than ordinary quadrature. This is particularly the case if the cluster sizes are large and the responses include (large) counts and/or continuous variables. Even where ordinary quadrature performs well, adaptive quadrature often requires fewer quadrature points making it faster.


Since heavy computation is involved, gllamm can be slow when there are many latent variables (random effects or factors), many parameters to be estimated and many observations. There are two ways of speeding up the program:

  1. Collapse the data as much as possible and use the weight() option. The time required to estimate a model is approximately proportional to the number of observations in the collapsed dataset. In the case of categorical responses and covariates, datasets can often be collapsed considerably (see the manual for examples).
  2. Start with the simplest model of interest (or fewer integration points) and introduce additional features (more integration points), passing the parameter estimates from the simpler model to gllamm as starting values for the more complicated model using the from() option.


The program gllapred is a 'post-estimation command' for gllamm. It can be used to obtain empirical Bayes predictions of the random effects or factors (also known as posterior means, factor scores or shrinkage estimators) for all GLLAMMs. Posterior standard deviations are also provided as well as various other options (see help gllapred after installation).


The program gllasim is a 'post-estimation command' for gllamm. It can be used to simulate the responses or latent variables for a model just estimated using gllamm (see help gllasim after installation).



What's New


Suggested citations for gllamm (all available on request)

Main citations The main citations are Rabe-Hesketh, Skrondal, and Pickles (2005) on estimation, showing that adaptive quadrature is accurate, and Rabe-Hesketh, Skrondal, and Pickles (2004) on the GLLAMM framework, showing the range of models that can be estimated in gllamm.

Other citations for specific special cases of models are given below.

For generalized linear mixed models or multilevel regression models and adaptive quadrature:

For factor, IRT or structural equation models:

For nominal data, discrete choice data and rankings:

For nonparametric maximum likelihood estimation (NPMLE) and covariate measurement error models:

For complex survey data:

For twin and family data:

For empirical Bayes prediction:

Other publications