MLwiN Paper Examples
Using SAS Proc Mixed to Fit Multilevel Models, Hierarchical Models, and Individual Growth Models
by Judith Singer

This paper can be downloaded from Professor Singer's web site at http://gseweb.harvard.edu/~faculty/singer/Papers/sasprocmixed.pdf .

MLwiN data files, hsb12.ws and willett.ws
 


First set of examples using hsb12.ws data file.

Page 329, MLwiN model

results of model


Page 331, MLwiN model

results of model


Page 335, MLwiN model

results of model


Pages 337/338, MLwiN model

results of model


Page 339, model with random intercepts only, getting the -2LL value

and the results


Second set of examples using willet.ws data file.

Page 342, MLwiN model using RIGLS estimation method.

and the results


Page 344, MLwiN model using RIGLS estimation method. First we have to create the centered covariate and its interaction with variable time.

->CALCulate "ccovar"="covar"-113.46
->CALCulate "timeByccovar"="time"*"ccovar"

and the results


Bottom of page 346 and top of page 347, MLwiN model using RIGLS estimation method.

and the results


* show same model with AR(1) structure (skipped for now)

Using strategy shown in Snijders and Bosker (chapter 12, pages 171-173), this appears to give similar results

MLwiN model

and the results

Based on the formula in Snijders and Bosker, page 172, using an excel spreadsheet the estimated covariance matrix is

s      
t 0 1 2 3
0 1320.811      
1 988.5674 1102.984    
2 815.8008 898.4462 1140.569  
3 643.0342 853.3856 1063.737 1433.565
       
Int Var 1161.334      
Slope Var -172.767 127.706    
Resid Var 159.477      

Result on page 347 using unstructured covariance structure.  MLwiN model using RIGLS estimation method.

First we have to set variable time to be categorical.

Then from Model menu, select Main effects and interactions. Choose variable time in the categorical section and click on Main Effects. Then click on all dummy variables to be included and then click on Build.

Each of the dummy variables for variable time is set to be random at person level, but we don't estimate their fixed effects. For example, variable time_1 is set up to be as follows. So does every other dummy variables for time.

and the results


* page 348, bottom of 348, top of 349, MLwiN model using the Snijders and Bosker strategy for the covariance matrix.

and the results

 

How to cite this page

Report an error on this page or leave a comment

The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.