runmlwin: Running MLwiN from within Stata
runmlwin is a Stata command which allows Stata users to run the powerful MLwiN multilevel modelling software from within Stata.
The multilevel models fitted by runmlwin are often considerably faster than those fitted by the Stata's xtmixed, xtmelogit and xtmepoisson commands. The range of models which can be fitted by runmlwin is also much wider than those commands. runmlwin also allows fast estimation on large data sets for many of the more complex multilevel models available through the user written gllamm command.
MLwiN has the following features:
- Estimation of multilevel models for continuous, binary, count, ordered categorical and unordered categorical data
- Fast estimation via classical and Bayesian methods
- Estimation of multilevel models for cross-classified and multiple membership nonhierarchical data structures
- Estimation of multilevel multivariate response models, multilevel spatial models, multilevel measurement error models and multilevel multiple imputation models
These details with a screen shot are available on our runmlwin leaflet (pdf, 0.1mb)
The runmlwin journal article
Read the runmlwinjournal article for a comprehensive introduction to the command.
- Leckie, G. and Charlton, C. (2013). runmlwin - A Program to Run the MLwiN Multilevel Modelling Software from within Stata. Journal of Statistical Software, 52 (11),1-40. (do).
We have provided a range of presentations showcasing runmlwin. These presentations provide a quick overview of how the command works and the range of models which can be fitted. More > >
Both MLwiN and Stata are required to use runmlwin. MLwiN is currently free to UK academics. A fully functional 30-day free version of MLwiN is available to all other users.
To install runmlwin, type the following command in a net aware version of Stata:
. ssc install runmlwin
If you do not have sufficient write privileges to install to this location, then you can install runmlwin manually by using the following Stata do-file.
Keeping runmlwin up-to-date
We are constantly improving runmlwin. To check that you are using the latest version of runmlwin, type the following command:
. adoupdate runmlwin
We have created comprehensive Stata help files for runmlwin and also for mcmcsum. The latter is a post-estimation command we have written to calculate MCMC summary statistics after fitting a runmlwin model using the MCMC estimation engine. We also provide the do-files to replicate the examples reported in each help file.
- runmlwin Stata help file (pdf, 0.1mb), Stata do-file (do, 0.1mb)
- mcmcsum Stata help file (pdf, 0.1mb), Stata do-file (do, 0.1mb)
We have provided Stata do-files which allow you to replicate all the analyses reported in the MLwiN User Manual and the MCMC MLwiN Manual using runmlwin. More > >
If you use runmlwin in your work, please cite runmlwin.
- Leckie, G. and Charlton, C. (2013). runmlwin - A Program to Run the MLwiN Multilevel Modelling Software from within Stata. Journal of Statistical Software, 52 (11),1-40.
We are happy to list all publications that cite runmlwin on this web site. More > >
Please use the runmlwin user forum to post any questions you have about runmlwin. The runmlwin authors monitor the forum and look forward to your feedback and suggestions.
We are very grateful to 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 LEMMA project, a node of the UK Economic and Social Research Council's National Centre for Research Methods (grant number RES-576-25-0003).