Multilevel Analysis/Hierarchical Linear Modeling
Edpsych/Psych/Stat 587
C.J. Anderson
Fall 2008
Last revised: December 4, 2008
General Information
Announcements
Lecture notes
Computer Lab
Homework
Example analyses
Handy program and links
Questions or problems regarding this site should be sent to
cja@illinois.edu.
Final:
- The final is due Friday, December 12, 2008 by 4:30pm. Your final/project can be turned into my mailbox in
the Education building, Psychology building or to me in person. If you include a self addressed stamped
envelope (large enough for your final/project to fit in) with campus address, I will return your exam/project
with comments and grade.
- Projcts: for those of you doing a final project, here is a description
of what to include in the final project.
- Exams: For thos of you doing a final exam, below is the exam and data set that you will need:
General Information (MSword
format):
Announcements:
- 12/4/2008:
- All homework keys and corresponding sas programs are on the web.
- Sometime in the near future, I'll post notes on random effects models for count data
(i.e., Poisson (loglinear) regression, Negative Binomial and Zero inflated models).
- ICES will be distributed either Dec 4 or last day of class---come with ideas for improvements.
- 11/13/2008:
- Link to homework 5 fixed.
- Computer code created during today's lab is online (look under computer lab 4)
- Answer key for homework 4 is linked.
- 11/11/2008: We will be in lab again this Thursday. If you came to the first
session on Tuesday, come to the first session on Thursday. If you came ot the 2nd
session Tuesday, come to the first session on Thursday. (The sessions left off at
different places).
- 11/10/2008: The next computer lab is Tuesday November 10. There are two sessions
9:00-10:30 and 10:30 -12:00. Given that the 2nd was a bit crowded last time, I'ld
suggest more come to the earlier one. The handouts, SAS, and homework are all posted.
- 11/3/2008:
- Office hours this week will be on TUESDAY Nov 4th from 1-3.
- SAS v 9.2 is available. It has much easier to use graphics and can do
lots of things easier than was possible in v 9.1.
- 10/30/2008:
- Notes online are correct...they're messed up on my laptop.
- Note that some of the titles on figures for exploring random effects for NELS are
incorrect.
- 10/21/2008:
- Homework 4 will be due Thursday Oct 30th so that if you have problems or questions, you can
see me during office hours on Wednesday.
- SAS code from lab 3 (both sessions) is linked down below.
- 10/20/2008:
- The next computer lab, computer lab 4, is Tuesday, October 21. The computer
lab notes and homework 4 are available below. As in previous labs, there will
be two sessions: (1) 9:00am-10:30am and (2) 10:30-12:00. Come to just one.
- The SAS code from computer lab 2 will be available tomorrow morning before lab.
- The answer key for homework 3 will be posted tomorrow morning before lab.
- I fixed the title page of notes on inference for random effects.
- 10/13/2008:
- The next computer lab will probably Thursday. I will decide for
sure Tuesday...depends whether we finish inference notes or not.
- I up-dated the next set of lecture notes (inference for random effects).
If you have printed these out, they are bascially the same, but there are
some changes which you can note in class.
- 9/29/2008:
- Instructions for computer lab #2, which will be Thursday Oct 1, is online.
- Homework #3 is available (this goes with lab #2) and is due Thursday Oct 16.
- The answers and sas code for homework #2 are available below.
- I up-dated lecture notes on random intercepts and slopes and the ones on Estimation.
- 9/26/2008:
- Next computer lab (#2) will be next Thursday, October 1.
- I will be editing notes on estimation (and random intercepts and slopes) to remove
known typos.
- 9/18/2008: Zhushan's Li's e-mail address is incorrect on the syllabus. Her
address is zli10@illinois.edu .
- 8/9/2008:
- SAS code under random intercept models and SAS for HLM were "cleaned" up.
- Computer Lab 1 will be Thursday Sept 11. Come to rm 15/17 in Education Building
for either the 9-10:30 or 10:30-12:00 session.
- Computer Lab instructions and data are posted on this site under Computer Lab 1.
- Homwork 2 which goes with this computer lab is also posted.
- 8/28/2008:
- Homework 1 is available and is due Thursday Sept 4th (in class).
- Introduction to SAS sessions will be held in rm 15/17 Education Bldg. The
dates and times are Thursday Sept 4th 9:00-9:50am and Friday Sept 5th 4:00-4:50pm.
Attendence is optional and you only need to attend one of these. The handout to
be used in the lab are below (under lecture notes).
- 8/18/2008: New syllabus is posted.
Lectures Notes (I will be re-doing some of the SAS programs):
- Random Intercept Models.
- ANCOVA.sas.
Fits ANCOVA model to NELS88, N=10 data (includes centering a variable, model
fitting using GLM, and SAS/GRAPH of model).
- hsb1.sas.
Creates SAS data set of level 1 data for the High School and Beyond data.
- hsb2.sas.
Creates SAS data set of level 2 data for the High School and Beyond data.
- hsball.sas.
Merges level 1 and level 2 high school and beyond sas datasets.
- betwithin.sas.
SAS/GRAPHS for looking between and within variability of SES in the high
school and beyond data.
- randomintercepts.sas.
SAS PROC MIXED and fitting random intercept models (includes centering SES)...and some graphics.
- SAS for HLM.
These will be used in lecture (they can also be used to reproduce the models for HSB data in
the lecture notes on random intercept models):
This is from the introduction to SAS session:
- Random Intercept and Slopes Models. (up-dated Sept 29, 2008 ---
I removed known typos, changed color to be more visible and incorperated "extra notes" into the lecture)
- Estimation of Marginal Model. (up-dated Sept 29, 2008)
- Statistical Inference: Marginal Model.
- Statistical Inference: Random Effects.
- Model Building. (these have been up-dated through page 168)
- eda.sas SAS program including commands for exploratory data analyses
(SAS/GRAPH, R^2meta, R^2_j, means structure, etc).
- Simulations.sas. SAS program running first simulation and exploration of
random structure.
- Simulation_long.sas. SAS program running second simulation and exploration
of random structure. This has a different sigma^2's and tau's.
- New Variance EDA.sas. Exploratory data analyses of random structure for example
given in class.
- SAS v9.1 experimental diagnostics..
- Longitudinal Data Analysis
- Logistic Regression.
Computer Lab Sessions:
- Computer Lab Session 0: Introduction to SAS in GRICL, rm 15/17 Education Building.
- Computer Lab Session 1: rm 15/17 Education Building, Sept 11.
- Computer Lab Session 2:
- Computer Lab Session 3:
- Computer Lab Session 4:
Homework
- Homework Number 1:
- Homework Number 2:
- Homework Number 3:
- Homework Number 4:
- Homework Number 5:
- Homework Number 6: Probably not one this year.....
Example SAS Programs (ascii/text format):
Examples from Snijders & Bosker using SAS
- MLbook.sas.
Create SAS data for examples in Chapters 4 and 5.
- Ch4_examples.sas.
Example 2-level analyses from Chapter 4 (random intercept models).
- Ch5_examples.sas.
Example 2-level analyses from Chapter 5 (random intercept and
slopes).
- Ch12_examples.sas.
Examples analyses from Chapter 12 (longitudinal data analysis),
including creating sas dataset.
Examples from Chapter 4 of Kreft & de Leeuw (provided and written
by Carol Nickerson):
-
School23.sas.
SAS code that creates data set and fits models reported in Kreft &
de Leeuw.
-
school23.dat.
Raw data file that is used as input to school23.sas.
Handy Programs and Links:
-
Ones specific to multilevel modeling:
-
General ones:
-
CIforP.f:
A FORTRAN program that computes large sample confidence intervals for a
proportion.
-
pvalue.f:
A FORTRAN program that computes p-values and (bonferroni) critical values
for the standard normal, chi-squared, t, and F distributions (and for correlations).
For users of PC type computers,
pvalue.exe
is an executable (i.e. already compiled) program.