Abstract

R2MLwiN is a new package designed to run the multilevel modeling software program MLwiN from within the R environment. It allows for a large range of models to be specified which take account of a multilevel structure, including continuous, binary, proportion, count, ordinal and nominal responses for data structures which are nested, cross-classified and/or exhibit multiple membership. Estimation is available via iterative generalized least squares (IGLS), which yields maximum likelihood estimates, and also via Markov chain Monte Carlo (MCMC) estimation for Bayesian inference. As well as employing MLwiN's own MCMC engine, users can request that MLwiN write BUGS model, data and initial values statements for use with WinBUGS or OpenBUGS (which R2MLwiN automatically calls via rbugs), employing IGLS starting values from MLwiN. Users can also take advantage of MLwiN's graphical user interface: for example to specify models and inspect plots via its interactive equations and graphics windows. R2MLwiN is supported by a large number of examples, reproducing all the analyses conducted in MLwiN's IGLS and MCMC manuals.

Highlights

  • In research fields as diverse as education, economics, medicine, psychology, and biology, it is commonplace to encounter data which are clustered: for example, exam results from many students across a smaller number of schools in a cross-sectional study, or clinical measurements taken repeatedly from the same individuals in a longitudinal study

  • When fitting this model below, note that we have chosen to include mcmcMeth = list(lclo = 1) in our list of estoptions so that MLwiN will fit the log of the precision (1/variance) at level 1 as a function of the predictors; since this can take any value on the real line, we are free of the restrictions on prior distributions which result from fitting the variance as a linear function of the predictors: R> F5 standlrtC1V_MCMC

  • This paper has introduced R2MLwiN, a new package which calls the multilevel modeling software MLwiN from within the R environment

Read more

Summary

Introduction

In research fields as diverse as education, economics, medicine, psychology, and biology, it is commonplace to encounter data which are clustered: for example, exam results from many students across a smaller number of schools in a cross-sectional study, or clinical measurements taken repeatedly from the same individuals in a longitudinal study. Multilevel models ( known as mixed models, random effects models, hierarchical models, etc.) achieve this by treating the units at each level (in the above examples: students and schools, measurement occasion and individuals, respectively), as a random sample from a larger population with an assumed distribution, partitioning the residual variance between levels

MLwiN software
The R2MLwiN package
Fitting a 2-level continuous response model via IGLS
Conducting a likelihood ratio test
Storing residuals
Fitting a 2-level continuous response model via MCMC
Adding a predictor to the fixed part of a model
Modeling complex level 1 variance
10. Fitting a 2-level binary response model via MCMC
11. Alternative MCMC methods implemented in MLwiN
11.1. An example using orthogonal parameterization to improve mixing
Method
12. Using R2MLwiN to write BUGS code
13. Modeling a cross-classified data structure
14. Modeling a multiple membership data structure
15. Multivariate response models
17. Other models and features
Findings
18. Conclusions

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.