
A User's Guide to MLwiN Version 2.26 by Jon Rasbash, Fiona Steele, William J. Browne & Harvey Goldstein Centre for Multilevel Modelling, University of Bristol Programming by Jon Rasbash, Chris Charlton & William J. Browne ii A User's Guide to MLwiN Copyright © 2012 Jon Rasbash, Fiona Steele, William J. Browne and Harvey Goldstein. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, for any purpose other than the owner's personal use, without the prior written permission of one of the copyright holders. ISBN: 978-0-903024-97-6 Printed in the United Kingdom First Printing November 2004. Updated for University of Bristol, October 2005, February 2009 and September 2012. iii This manual is dedicated to the memory of Ian Lang- ford, a greatly missed friend and colleague. iv Contents Table of Contents viii Introduction ix About the Centre for Multilevel Modelling.............. ix Installing the MLwiN software..................... ix MLwiN overview............................x Enhancements in Version 2.26..................... xi Estimation............................. xi Exploring, importing and exporting data............ xi Improved ease of use....................... xii MLwiN Help.............................. xii Compatibility with existing MLn software.............. xii Macros.................................. xiii The structure of the User's Guide................... xiii Acknowledgements........................... xiii Further information about multilevel modelling........... xiv Technical Support........................... xiv 1 Introducing Multilevel Models1 1.1 Multilevel data structures....................1 1.2 Consequences of ignoring a multilevel structure........2 1.3 Levels of a data structure....................3 1.4 An introductory description of multilevel modelling......6 2 Introduction to Multilevel Modelling9 2.1 The tutorial data set.......................9 2.2 Opening the worksheet and looking at the data........ 10 2.3 Comparing two groups...................... 13 2.4 Comparing more than two groups: Fixed effects models.... 20 2.5 Comparing means: Random effects or multilevel model.... 28 Chapter learning outcomes....................... 35 3 Residuals 37 3.1 What are multilevel residuals?.................. 37 3.2 Calculating residuals in MLwiN................. 40 3.3 Normal plots........................... 43 Chapter learning outcomes....................... 45 4 Random Intercept and Random Slope Models 47 v vi CONTENTS 4.1 Random intercept models.................... 47 4.2 Graphing predicted school lines from a random intercept model 51 4.3 The effect of clustering on the standard errors of coefficients. 58 4.4 Does the coefficient of standlrt vary across schools? Intro- ducing a random slope...................... 59 4.5 Graphing predicted school lines from a random slope model. 62 Chapter learning outcomes....................... 64 5 Graphical Procedures for Exploring the Model 65 5.1 Displaying multiple graphs.................... 65 5.2 Highlighting in graphs...................... 68 Chapter learning outcomes....................... 77 6 Contextual Effects 79 6.1 The impact of school gender on girls' achievement....... 80 6.2 Contextual effects of school intake ability averages....... 83 Chapter learning outcomes....................... 87 7 Modelling the Variance as a Function of Explanatory Vari- ables 89 7.1 A level 1 variance function for two groups........... 89 7.2 Variance functions at level 2................... 95 7.3 Further elaborating the model for the student-level variance. 99 Chapter learning outcomes....................... 106 8 Getting Started with your Data 107 8.1 Inputting your data set into MLwiN............... 107 Reading in an ASCII text data file............... 107 Common problems that can occur in reading ASCII data from a text file......................... 108 Pasting data into a worksheet from the clipboard....... 109 Naming columns......................... 110 Adding category names...................... 111 Missing data............................ 111 Unit identification columns.................... 112 Saving the worksheet....................... 112 Sorting your data set....................... 112 8.2 Fitting models in MLwiN.................... 115 What are you trying to model?................. 115 Do you really need to fit a multilevel model?.......... 115 Have you built up your model from a variance components model?........................... 116 Have you centred your predictor variables?........... 116 Chapter learning outcomes....................... 116 9 Logistic Models for Binary and Binomial Responses 117 9.1 Introduction and description of the example data....... 117 9.2 Single-level logistic regression.................. 119 Link functions........................... 119 CONTENTS vii Interpretation of coefficients................... 120 Fitting a single-level logit model in MLwiN........... 120 A probit model.......................... 126 9.3 A two-level random intercept model............... 127 Model specification........................ 127 Estimation procedures...................... 128 Fitting a two-level random intercept model in MLwiN..... 128 Variance partition coefficient................... 131 Adding further explanatory variables.............. 134 9.4 A two-level random coefficient model.............. 135 9.5 Modelling binomial data..................... 139 Modelling district-level variation with district-level proportions 139 Creating a district-level data set................. 140 Fitting the model......................... 142 Chapter learning outcomes....................... 143 10 Multinomial Logistic Models for Unordered Categorical Re- sponses 145 10.1 Introduction............................ 145 10.2 Single-level multinomial logistic regression........... 146 10.3 Fitting a single-level multinomial logistic model in MLwiN.. 147 10.4 A two-level random intercept multinomial logistic regression model............................... 154 10.5 Fitting a two-level random intercept model........... 155 Chapter learning outcomes....................... 159 11 Fitting an Ordered Category Response Model 161 11.1 Introduction............................ 161 11.2 An analysis using the traditional approach........... 162 11.3 A single-level model with an ordered categorical response vari- able................................ 166 11.4 A two-level model......................... 171 Chapter learning outcomes....................... 181 12 Modelling Count Data 183 12.1 Introduction............................ 183 12.2 Fitting a simple Poisson model................. 184 12.3 A three-level analysis....................... 186 12.4 A two-level model using separate country terms........ 188 12.5 Some issues and problems for discrete response models.... 192 Chapter learning outcomes....................... 192 13 Fitting Models to Repeated Measures Data 193 13.1 Introduction............................ 193 13.2 A basic model........................... 196 13.3 A linear growth curve model................... 203 13.4 Complex level 1 variation..................... 206 13.5 Repeated measures modelling of non-linear polynomial growth 206 Chapter learning outcomes....................... 210 viii CONTENTS 14 Multivariate Response Models 211 14.1 Introduction............................ 211 14.2 Specifying a multivariate model................. 212 14.3 Setting up the basic model.................... 214 14.4 A more elaborate model..................... 219 14.5 Multivariate models for discrete responses........... 222 Chapter learning outcomes....................... 224 15 Diagnostics for Multilevel Models 227 15.1 Introduction............................ 227 15.2 Diagnostics plotting: Deletion residuals, influence and leverage 233 15.3 A general approach to data exploration............. 242 Chapter learning outcomes....................... 242 16 An Introduction to Simulation Methods of Estimation 243 16.1 An illustration of parameter estimation with Normally dis- tributed data........................... 244 16.2 Generating random numbers in MLwiN............. 251 Chapter learning outcomes....................... 255 17 Bootstrap Estimation 257 17.1 Introduction............................ 257 17.2 Understanding the iterated bootstrap.............. 258 17.3 An example of bootstrapping using MLwiN........... 259 17.4 Diagnostics and confidence intervals............... 266 17.5 Nonparametric bootstrapping.................. 266 Chapter learning outcomes....................... 272 18 Modelling Cross-classified Data 273 18.1 An introduction to cross-classification.............. 273 18.2 How cross-classified models are implemented in MLwiN.... 275 18.3 Some computational considerations............... 275 18.4 Modelling a two-way classification: An example........ 277 18.5 Other aspects of the SETX command.............. 279 18.6 Reducing storage overhead by grouping............. 281 18.7 Modelling a multi-way cross-classification............ 282 18.8 MLwiN commands for cross-classifications........... 283 Chapter learning outcomes....................... 284 19 Multiple Membership Models 285 19.1 A simple multiple membership model.............. 285 19.2 MLwiN commands for multiple membership models...... 288 Chapter learning outcomes....................... 288 Bibliography 289 Index 292 Introduction About the Centre for Multilevel Modelling The Centre for Multilevel Modelling was established in 1986, and has been supported largely
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages306 Page
-
File Size-