runmixregls: Running MIXREGLS within Stata

runmixregls is a Stata command which allows Stata users to run the MIXREGLS mixed-effects location scale software from within Stata.

The mixed-effects location scale model extends the standard two-level random-intercept mixed-effects model for continuous responses (implemented in Stata as xtreg, mle) in three ways:

  1. The (log of the) within- and between-group variances are further modelled as functions of the covariates.
  2. A new random effect, referred to as the random- scale effect, is then entered into the within-group variance function to account for any unexplained group differences in the residual variance. The existing random-intercept effect is now referred to as the random-location effect.
  3. A group-level association between the location and the scale may be allowed for by entering the random-location effect into the within-group variance function using either a linear or quadratic functional form. The regression coefficients of these linear and quadratic terms are then estimated.

The distributions of the random-location and random-scale effects are assumed to be Gaussian.

MIXREGLS is developed by Hedeker and Nordgren (2013).

The runmixregls journal article

Read the runmixregls journal article for a comprehensive introduction to the command.


We have created a presentation to provide a quick overview of how runmixregls works and the range of models which can be fitted.


Both MIXREGLS and Stata are required to use runmixregls. MIXREGLS is free software.

To install runmixregls, type the following command in a net aware version of Stata:

. ssc install runmixregls

Keeping runmixregls up-to-date

We may make improvements to runmixregls over time. To check that you are using the latest version of runmixregls, type the following command:

. adoupdate runmixregls


We have created a comprehensive Stata help file for runmixregls.

Citing runmixregls

runmixregls is not an official Stata command. It is a free contribution to the research community, like a paper. Please cite it as such:

Similarly, please also cite the MIXREGLS software:


runmixregls is developed by George Leckie (


We are very grateful to Don Hedeker and also colleagues at the Centre for Multilevel Modelling and the University of Bristol for their useful comments.

The development of this command was funded under the LEMMA3 project, a node of the UK Economic and Social Research Council's National Centre for Research Methods (grant number RES-576-25-0035).