Kaz's SAS, HLM, and Rasch Model
Comparison of HLM software and SAS PROC MIXED
Large National Data Sets
Kaz Library
SAS manuals
What is "error"?
Rasch Model
Factor Analysis
Reading output via SAS
Excel functions for Statistical Analysis
Essays on learning statistics
Statistics in Japanese
My profile
My SAS questions and SAS's responses
My work tool box
Comparison of HLM software (r) and SAS PROC MXIED(r)
Data Preparation Must prepare data sets specific to levels, using statistical package, such as SPSS or SAS.  You need to create an SSM data set with which to run control files.  Level 1 data and level 2 data can stay in one SAS data set.
Syntax Use a level specific equation as a syntax:  LEVEL1:MATHACH=INTRCPT1+SES,1+RANDOM
Use one line equation, which looks like this:proc mixed data=both2 covtest noclprint;
by IDcntry;
class college boy;
model bsmpv01= college boy/ solution ddfm=bw ;
random intercept college boy/ sub= IDSCHOOL s;
ods output solutionR=sol;
Click and drop control Click-and-drop method, but a syntax-based batch mode entry also okay. Syntax based. 
My general comments

HLM is a very user friendly software.  I think it would be easier to teach a course with HLM software. 

The use of HLM requires that I make many number of files, including SAS or SPSS files that prepare level-specific data sets, HLM files that create SSM data, HLM control files, HLM output files.  I tend to be overwhelmed by a massive number of files.

One question, when HLM includes dummy variables, apparently, there is no way for HLM program to know that they are categorical variables.  Is this okay?  In SAS, the dummy variables are recognized as categorical variablse and the different degree of freedom is used to evaluate the size of standard errors for dummy variables. 

This probably is a Statistics 101 question.  When we do OLS regression, we can include dummy variables, as well as continous scales as independent variables and treat them as if they are both numeric variables and no consideration is made as to how to do statistical testing.  Is this okay?  Shouldn't we use different values for degree of freedom, which takes into consideration the fact that a dummy variable is a categorical variable?

The advantage of SAS PROC MIXED is that it is part of SAS; thus, a user can benefit from all other functionalities of SAS.  I like the fact that I can use just one SAS syntax to do data preparation, as well as analyses.  Yet it can be also a disadvantage if a user is not interested in learning SAS.

One question I have.  HLM can allow different weights to be used for different levels (we talk about level 1 weights and level 2 weights).  SAS PROC MIXED does not have this option.  Is this a problem?

Copyright 2005 KU
For information inquiry (AT) estat.us