MLwiN logo MLwiN

A software package for fitting multilevel models

You can now upgrade to to our latest version - MLwiN 2.17 (02-Feb-10)

MLwiN was created by the Centre for Multilevel Modelling team with colleagues in other centres. MLwiN has benefited enormously from the input of numerous people. Michael Healy wrote the original version of NANOSTAT which formed the basis for MLn, a predecessor of MLwiN. Professor Bill Browne provided the foundations and coding of the MCMC features of the software. The (ESRC) have provided essential support over the years.

New MCMC methodology features in MLwiN 2.13

As part of ESRC grant RES-000-23-1190-A entitled “Sample Size, Identifiability and MCMC Efficiency in Complex Random Effect Models” we have been adding additional MCMC functionality to MLwiN (as well as developing the MLPowSim software package).

The MCMC functions added do not expand the models that can be fitted within MLwiN but instead offer alternative MCMC approaches for certain existing model classes that are faster or produce better mixing chains. An additional MCMC options menu item has been added which allows the user to select from various MCMC methods including parameter expansion, hierarchical centering, orthogonal parameterisations, structured MCMC and structured MVN formulations.

A new version of the book “MCMC Estimation in MLwiN” that accompanies the software has been produced. In this book the existing material has been updated and slightly reordered and we have added five additional chapters to cover each of the new MCMC methods that have been implemented. You can download web or printable versions of the new MCMC manual here.

If you use the new features and would like to give feedback, bug reports or a wish list please e-mail me (william.browne@bristol.ac.uk). More details of the developments and links to journal articles linked to the project are available at seis.bris.ac.uk/~frwjb/esrc.html

Good luck with the software,
Prof W J Browne

MLwiN 2.1 and subsequent versions

Our latest releases begin with 2.1… and are the same as 2.10 except that bugs have now been fixed. If your version is not the latest one you can upgrade in the usual way, and you can also check which bugs have been fixed. The training materials work with all MLwiN versions from 2.10 onwards.

Referencing the MLwiN software and manuals

application logo MLwiN software

If you have used the software in published work, please use the following citations:

MLwiN Version 2.02

Rasbash, J., Charlton, C., Browne, W.J., Healy, M. and Cameron, B. (2005) MLwiN Version 2.02. Centre for Multilevel Modelling, University of Bristol.

MLwiN Version 2.1

Rasbash, J., Charlton, C., Browne, W.J., Healy, M. and Cameron, B. (2009) MLwiN Version 2.1.  Centre for Multilevel Modelling, University of Bristol.

Markov chain Monte Carlo (MCMC) estimation

If you are using MCMC estimation methods, we ask that you additionally cite:

Browne, W.J. (2009) MCMC Estimation in MLwiN v2.1.  Centre for Multilevel Modelling, University of Bristol.

book MLwiN Manuals

You may want to reference material in the manuals. If so the correct references are:

Rasbash, J., Steele, F., Browne, W.J. and Goldstein, H. (2009) A User’s Guide to MLwiN, v2.10. Centre for Multilevel Modelling, University of Bristol.

Browne, W.J. (2009) MCMC Estimation in MLwiN, v2.10.  Centre for Multilevel Modelling, University of Bristol.

Rasbash, J., Charlton, C. and Pillinger, R. (2009) Manual Supplement to MLwiN v2.10. Centre for Multilevel Modelling, University of Bristol.

MLwiN: A visual interface for multilevel modelling

Multilevel modelling

Multilevel modelling has rapidly become established as the appropriate tool for modelling data with complex hierarchical structures. It is important for extending our understanding of social, biological and other sciences beyond that which can be obtained through single level modelling. Multilevel modelling is now being used in Education, Medical science, Demography, Economics, Agriculture and many other areas.

The term multilevel refers to a nested membership relation among units in a system. In an education system, for example, students are members of classes, and classes are grouped within schools. When 'single level' techniques such as multiple regression are applied to data from a structure such as this, the analysis will ignore important aspects of the data structure and the results will often be misleading.

The basic procedures for modelling purely hierarchical data have been extended to include cross-classifications and cases where lower level units belong to more than one higher level unit. Thus, models can now be fitted to data with extremely complex structures.

Multivariate regression and multivariate analysis of variance can be conducted in a particularly flexible manner using a multilevel approach. The models can also be used to fit growth curves and other repeated measures data with either continuous or discrete responses, estimate variance and covariance components from studies with complex designs, and analyse data from studies employing rotation sampling. Multilevel time series data can be modelled. Multilevel generalised linear models can be fitted: for example, logit, log-log or probit models for binary response data and macros are available for multinomial ordered or unordered logistic models. Multilevel survival or event history models can be fitted. Complex sample survey data can be modelled flexibly and efficiently.

MLwiN features

Fully-licensed users will receive free maintenance upgrades and technical support are available via email to answer questions about the software.

An important feature of MLwiN is its graphical interfaces. These allow the user easily to set up, fit and manipulate models. There are windows for data manipulation, plotting, viewing the progress of iterations etc. Predictions from fitted models can be specified directly using standard statistical notation with direct links to various kinds of derived graphs, which are automatically updated as model parameters change. Likewise, posterior residual estimates and functions of them can be linked directly to graphs, for example for model diagnostics.

Multivariate models are simple to specify using a special input screen. Complex variance functions can be specified and the software will allow linear and non-linear modelling of variances as functions of explanatory variables with an interactive screen, which displays the resulting model in standard notation.

Markov Chain Monte Carlo (MCMC) Bayesian modelling is incorporated with detailed visual diagnostics. Parametric nd non-parametric bootstrapping is available and an iterated bootstrap has been implemented for unbiased estimation with multilevel generalised linear models.

More about MLwiN Features

The equations window

In MLwiN you can specify models in three different ways. The original command interface of MLn can be used - and in release 2.0 you will have to use this for certain advanced features. A system o bf dialogue boxes can be completed or you can directly manipulate the elements of the model equation. Consistency is maintained so that, for example, completing a dialogue box also updates the equations.

The MLwiN window below shows a 2 level random coefficient model with two explanatory variables, a constant, with no subscripts and an explanatory variable with a level 1 and a level 2 subscript indicating that it varies across each type of unit. MLwiN automatically decides which subscripts to use when you define a variable. Note also the Normal distribution assumption - this can be changed for generalised linear models. along with a selection of link functions. The last two lines define the random variables at each level.

Equations window

Graphing in MLwiN

Extensive plotting facilities are available. Any graph can be altered in terms of colour, symbols, lines etc.

We can superimpose graphs, lay them out in patterns (such as trellis plots), label them, identify points or lines on them in terms of data units and copy and paste them to other applications. Several special kinds of graphs are created directly by the software, for example for displaying diagnostics.

The caterpillar graph below is created from the residuals window and represents a set of ordered shrunken residual estimates of school effects with 95% confidence intervals from a variance components model.

intercept graph

Monitoring MCMC estimation

MCMC methods allow Bayesian models to be fitted with prior parameter distributions. By default MLwiN sets diffuse priors. Both Gibbs sampling and Metropolis Hastings sampling can be used.

We can obtain summary measures and diagnostics by clicking on any of the trajectory graphs to obtain a diagnostic window similar to the one on the left which shows a kernel density plot, auto-correlation functions and estimates of the required chain length, etc. for a level 2 variance parameter. Had an informative prior been specified, its distribution would have been superimposed on that of the posterior kernel density.

shopping basket Buy MLwiN