Running MLwiN from within R

Description

R2MLwiN is an R command interface to the MLwiN multilevel modelling software package, allowing users to fit multilevel models using MLwiN (and also WinBUGS / OpenBUGS) from within the R environment.

New features in version 0.8-3

Support for model comparison tables via texreg-package and memisc-package have been added to R2MLwiN version 0.8-3. For an example of using texreg-package see e.g. demo(MCMCGuide04).

Important differences between version 0.8-0 and earlier versions

A number of wide-ranging changes, including a new model-fitting syntax more in keeping with that conventionally used in R, were introduced in R2MLwiN version 0.8-0.

The demos, which replicate both the User's Guide to MLwiN (Rasbash et al, 2012) and MCMC Estimation in MLwiN (Browne, 2012) manuals, provide practical demonstrations of many of these changes. See demo(package = "R2MLwiN") for a list of demo titles; to run one type e.g. demo(UserGuide03) or view a demo's script via file.show(system.file("demo", "UserGuide03", package = "R2MLwiN")).

References

R2MLwiN

Zhang, Z., Parker, R.M.A., Charlton, C.M.J., Leckie, G. and Browne, W.J. (2016) R2MLwiN: A Package to Run MLwiN from within R. Journal of Statistical Software, 72(10), 1-43. doi:10.18637/jss.v072.i10

MLwiN software and manuals

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

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

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

Rasbash, J., Steele, F., Browne, W.J. and Goldstein, H. (2012) A User's Guide to MLwiN Version 2.26. Centre for Multilevel Modelling, University of Bristol.

OpenBUGS

Thomas, A., O'Hara, B., Ligges, U. and Sturtz, S. (2006) Making BUGS Open. R News, 6, 12:17.

WinBUGS

Spiegelhalter, D.J., Thomas, A. and Best, N.G. (1999) WinBUGS Version 1.2 User Manual. MRC Biostatistics Unit.

Maintainer

Zhengzheng Zhang zhengzheng236@gmail.com

Author(s)

Zhang, Z., Charlton, C.M.J., Parker, R.M.A., Leckie, G., and Browne, W.J. (2016) Centre for Multilevel Modelling, University of Bristol.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Not run: 
library(R2MLwiN)
# NOTE: if MLwiN not saved in location R2MLwiN defaults to, specify path via:
# options(MLwiN_path = 'path/to/MLwiN vX.XX/')
# If using R2MLwiN via WINE, the path may look like this:
# options(MLwiN_path = '/home/USERNAME/.wine/drive_c/Program Files (x86)/MLwiN vX.XX/')

data(tutorial, package = "R2MLwiN")

(mymodel <- runMLwiN(normexam ~ 1 + standlrt + (1 + standlrt | school) + (1 | student),
                     estoptions = list(EstM = 1), data = tutorial))

## The R2MLwiN package includes scripts to replicate all the analyses in
## Rasbash et al (2012) A User's Guide to MLwiN Version 2.26 and
## Browne, W.J. (2012) MCMC estimation in MLwiN Version 2.26.
## The MLwiN manuals are available online, see:
## http://www.bristol.ac.uk/cmm/software/mlwin/download/manuals.html

## For a list of demo titles
demo(package = 'R2MLwiN')

## Take MCMCGuide03 as an example
## To view file
file.show(system.file('demo', 'MCMCGuide03.R', package='R2MLwiN'))

## To run the demo
demo(MCMCGuide03)

## End(Not run)

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.