R2MLwiN is an R command interface to the MLwiN multilevel modelling software package, allowing users to fit multilevel models using MLwiN from within the R environment.
If you wish to cite the article (available here), please do so as:
This includes the following new features (and also note bug fixes):
(For older news items, see the news archive).
As R2MLwiN depends on a number of third party packages we suggest that before installing the package you run the command:
update.packages(repos = "http://cran.r-project.org")
to ensure that any you already have installed are up to date.
You can then install the package from CRAN with the following command:
install.packages("R2MLwiN", repos = "http://cran.r-project.org")
Alternatively a less tested development version, which will contain the most recent changes and bug fixes, can be installed with the following commands:
To then load it, type:
A pre-print of an upcoming article describing R2MLwiN is available here. If you wish to cite the article, please do so as:
As with all packages on CRAN, R2MLwiN comes with a number of help files; to see a list of the documentation available, type the following at the R command line:
help(package = "R2MLwiN")
The main command for calling MLwiN from R is called runMLwiN, and details of the syntax and options for this can be found with:
R2MLwiN also comes with a range of demos; these replicate all the analyses reported in the (IGLS) User's Guide to MLwiN and the MLwiN MCMC Manual. To see a list of these, type:
demo(package = "R2MLwiN")
To view the script of a specific demo (in this example the code replicating the analyses in Chapter 3 of the MLwiN MCMC Manual) type:
file.show(system.file("demo", "MCMCGuide03.R", package = "R2MLwiN"))
Finally, to run that demo, enter the following:
These demos and their outputs can also be viewed on the Examples page.
Please cite R2MLwiN as follows:
We are happy to list all publications that cite R2MLwiN on this web site. More >>
We gave a presentation on R2MLwiN at the 10th International Multilevel Conference in Utrecht (9th-10th April 2015). There's a pdf file below (converted from a Powerpoint file, with animations split courtesy of PPspliT):
Slides (PDF, 4.0mb)
Please use the R2MLwiN user forum to post any questions or feedback you have regarding R2MLwiN.
We are very grateful to colleagues at the Centre for Multilevel Modelling and the University of Bristol for their useful comments. This work is funded under the e-STAT node (Grant: RES-149-25-1084) as part of the ESRC Digital Social Research programme.