PubH 6470: SAS Procedures and Data Analysis, Fall 2009
Course Information
PubH 6470 introduces students with a background in statistics to
programming, graphics, and data analysis using SAS. The course
concentrates on data-step programming, data editing
and reformatting, as well as statistical applications. Students will
complete and present a data analysis for a final class project, using
data from the student's field if possible. Projects need advance approval from the instuctor.
Instructor: William Thomas, Mayo A-467, 625-0651
Office hours: 2:30 - 3:30 Wednesdays or by appointment
TA Office Hours in computing lab (Mayo C-381): Wednesdays 1:30 - 3:00, and Fridays 3:00 - 4:30
In addition to Mayo C-381, PC-SAS is installed at these computing labs:
Diehl Hall Biomed Library
Coffman Union
Many documents on this website are in PDF format. For the software to read them, download
Adobe Acrobat Reader here.
I recommend doing the coursework with PC-SAS on your own computer.
Get PC-SAS through the University of Minnesota for $120 per year.
Introduction to SAS
Resources for solving problems in SAS
Homework
Syllabus and Class Notes
- Intro to SAS: reading and storing data, linear regression (Weeks 1-2)
- Basics: DATA step, arrays, plots, ANOVA and regression, LSmeans, macros, bootstrap (Weeks 3-8)
- 5. Data set options, graphics, more on set and merge,
scatterplots program.
- 6. Design matrix, Reg and GLM,
discrepant_values.sas.
- 7. More on indicator variables, Reg and GLM, date and time data,
HAMD.xls.
- 8. Interaction plots, dates, arrays, computing AUC,
SAS code,
HAMD.xls,
barley.xls,
blood samples.xls.
- 10. Macros.
- 12. Linear model example: Minnesota math scores,
SAS code,
grade8_mathscores.xls.
- 13. Character variables, program structure ,
updated SAS code.
- 14. Continue regression example: outliers ,
updated SAS regression code.
- 15. Finish regression example, ODS select and ODS output,
updated SAS regression code.
- 16. Bootstrap: macros and Proc Surveyselect,
SAS bootstrap code,
bootstrapmacros.sas,
SAS bootstrap documentation.
- 17. Reading a spreadsheet with problems,
bad-spreadsheet.xls,
bad-spreadsheet_1.csv,
bad-spreadsheet_2.csv,
Class17.sas.
- Take-home midterm (22 October), MinnHeart.xls.
- Longitudinal data, crossover trials, hierarchical linear models (Weeks 8-10)
- Logistic regression: prediction, propensity scores, matching, ordinal regression (Weeks 11-12)
- Class presentations (Weeks 13-15)
2008 Lecture Notes and Examples
- Intro to SAS I;
SAS program.
- Intro to SAS II, reading Excel spreadsheets;
Workbook1.xls,
Workbook2.xls,
SAS program.
- Data checking, Proc Insight, SAS Manual, basic tests
-
Missing values, graphics, reporting in MSWord, SET, MERGE;
"Fix SAS output" MSWord macro,
SAS program
-
Merging, data set options, GLM.
-
GLM: residual & interaction plots, means, LSmeans, dates, arrays;
SAS program.
-
GLM: LSmeans, estimate; missing values.
-
MI and MIanalyze with GLM; smoothing, jitter;
SAS code,
HAMD2 data.
-
Correlation, partial correlation, regression: Proc REG;
SAS program,
Grade 8 data (SAS permanent file).
-
Regression example, VIF, plots, subset selection.
-
Making CLASS variables for Proc Reg, predictions, sample size;
SAS program.
-
Macros and Bootstrap;
SAS program,
bootstrapmacros.sas,
SAS bootstrap documentation.
-
Bootstrap confidence intervals: correlation, kappa, agreeement.
-
Bootstrap prediction error, t-tests.
-
Longitudinal data: graphs, area under a curve (AUC);
SAS program.
-
Within-person correlation, covariance matrix.
-
Proc Mixed: repeated measures, random effects.
-
Crossover designs.
-
Logistic regression.
-
Log-binomial, repeated binary observations.
-
Conditional logistic regression, ordinal logistic regression.
-
Survival data, Kaplan-Meier estimates, randomization log-rank test,
SAS code,
macro file from Cantor: SAS Survival Analysis Techniques, 2nd ed..
-
Reporting comparisons of survival curves, proportional hazards regression.
-
Checking proportional hazards, subset selection, time-varying predictors.
-
Competing risks: cumulative incidence,
SAS code for lecture,
CumIncid macro (from www.sas.com),
BMT data from Klein & Moeschberger, Survival Analysis,2nd ed, sec 1.3, App D.