Examples using R2MLwiN

MLwiN User Manual

These R-files and Rout files replicate the analyses reported in the MLwiN User Manual (PDF, 3,993kB).‌ Rasbash, J., Steele, F., Browne, W.J. and Goldstein, H. (2012) Centre for Multilevel Modelling, University of Bristol.

Note that we have not created script files for Chapters 1, 8 or 19 of the manual as no models are fitted in those chapters. We have also not yet created the script file for Chapter 17.

  • 1 Introducing Multilevel Models
  • 2 Introduction to Multilevel Modelling (R | Rout)
  • 3 Residuals (R | Rout)
  • 4 Random Intercept and Random Slope Models (R | Rout)
  • 5 Graphical Procedures for Exploring the Model (R | Rout)
  • 6 Contextual Effects (R | Rout)
  • 7 Modelling the Variance as a Function of Explanatory Variables (R | Rout)
  • 8 Getting Started with your Data
  • 9 Logistic Models for Binary and Binomial Responses (R | Rout)
  • 10 Multinomial Logistic Models for Unordered Categorical Responses (R | Rout)
  • 11 Fitting an Ordered Category Response Model (R | Rout)
  • 12 Modelling Count Data (R | Rout)
  • 13 Fitting Models to Repeated Measures Data (R | Rout)
  • 14 Multivariate Response Models (R | Rout)
  • 15 Diagnostics for Multilevel Models (R | Rout)
  • 16 An Introduction to Simulation Methods of Estimation (R | Rout)
  • 17 Bootstrap Estimation
  • 18 Modelling Cross-classified Data (R | Rout)
  • 19 Multiple Membership Models

MLwiN MCMC Manual

These R-files and Rout files replicate the analyses reported in the MLwiN MCMC Manual (PDF, 6,738kB). Browne, W.J. (2012) Centre for Multilevel Modelling, University of Bristol.

  • 1 Introduction to MCMC Estimation and Bayesian Modelling (R | Rout)
  • 2 Single Level Normal Response Modelling (R | Rout)
  • 3 Variance Components Models (R | Rout)
  • 4 Other Features of Variance Components Models (R | Rout)
  • 5 Prior Distributions, Starting Values and Random Number Seeds (R | Rout)
  • 6 Random Slopes Regression Models (R | Rout)
  • 7 Using the WinBUGS Interface in MLwiN (R | Rout)
  • 8 Running a Simulation Study in MLwiN (R | Rout)
  • 9 Modelling Complex Variance at Level 1 / Heteroscedasticity (R | Rout)
  • 10 Modelling Binary Responses (R | Rout)
  • 11 Poisson Response Modelling (R | Rout)
  • 12 Unordered Categorical Responses (R | Rout)
  • 13 Ordered Categorical Responses (R | Rout)
  • 14 Adjusting for Measurement Errors in Predictor Variables (R | Rout)
  • 15 Cross Classified Models (R | Rout)
  • 16 Multiple Membership Models (R | Rout)
  • 17 Modelling Spatial Data (R | Rout)
  • 18 Multivariate Normal Response Models and Missing Data (R | Rout)
  • 19 Mixed Response Models and Correlated Residuals (R | Rout)
  • 20 Multilevel Factor Analysis Modelling (R | Rout)
  • 21 Using Structured MCMC (R | Rout)
  • 22 Using the Structured MVN framework for models (R | Rout)
  • 23 Using Orthogonal fixed effect vectors (R | Rout)
  • 24 Parameter expansion (R | Rout)
  • 25 Hierarchical Centring (R | Rout)

 Journal article for R2MLwiN

The following R and Rout files replicate the analyses in Zhengzheng Zhang, Richard M. A. Parker, Christopher M. J. Charlton, George Leckie, William J. Browne (2016). R2MLwiN: A Package to Run MLwiN from within R. Journal of Statistical Software, 72(10), 1-43.

  • Zhengzheng Zhang, Richard M. A. Parker, Christopher M. J. Charlton, George Leckie, William J. Browne (2016). R2MLwiN: A Package to Run MLwiN from within R (R | Rout)

 Journal article for runmlwin

The following R and Rout files are a translation into R of the analyses in Leckie, G. and Charlton, C. (2013). runmlwin - A Program to Run the MLwiN Multilevel Modelling Software from within StataJournal of Statistical Software, 52 (11),1-40.

  • Leckie and Charlton (2013) runmlwin - A Program to Run the MLwiN Multilevel Modeling Software from within Stata (R | Rout)
Edit this page