Biostatistics 510: Statistical Computing Packages Winter 2006

I teach Biostat 510 in the Biostatistics Department at the University of Michigan School of Public Health . We cover simple data management tasks and basic statistical techniques using the statistical software packages, SAS and SPSS.
  • Click here to see the 2006 course syllabus.
  • Click here to see instructions on how to save/export a graph from SAS/GRAPH or SAS/INSIGHT.
  • autism_demog.sas7bdat SAS data set containing the demographic information for 213 autistic children whose social skills were assessed at several time points.
  • autism_socialization.sas7bdat SAS data set containing the socialization scores (VSAE and VSST) for the ages (cohorts) of 2, 3, 5, 9, 13, and 14 years.
  • Autism Study.doc: a brief description of the Autism data set.
  • missing_values_in_SPSS.doc: information on how to work with missing values in SPSS.

  • Final Project

  • Click here to get to the final project assignment and the data sets.

  • You can download class handouts and related materials here:

    Descriptive Statistics in SAS
  • descriptives.doc This handout shows how to import an Excel file and create a temporary SAS data set, set up missing values in a SAS data set, and calculating simple simple descriptive statistics.
  • OWEN.XLS This is the Excel file that is used for the descriptive statistics example above.
  • Preparing Data Using Excel This web page from CSCAR gives an explanation of how to set up an Excel file for use with a statistical package, such as SAS or SPSS.

  • t-tests in SAS
  • ttest.doc This handout shows how to create a permanent SAS data set from an Excel file, and how to carry out independent and paired samples t-tests, and a one-sample t-test.

  • Simple Linear Regression in SAS
  • simple_regression.doc This handout shows how to carry out a simple regression using SAS, and get some diagnostic plots.
  • WERNER2.DAT This data set can be used for the simple regression problem, illustrated in the handout above.
  • simple_regression.sas These SAS commands are used to carry out the simple regression example.

  • Dummy Variable Regression in SAS
  • dum_var_regression.doc This handout shows how to carry out a dummy variable regression using SAS, how to do a polynomial regression, and how to do Box-Cox transformations.
  • dum_var_regression.sas These are the SAS commands that go along with the handout on dummy variable regression above.

  • Multiple Regression and Collinearity Diagnostics in SAS
  • Multiple_Regression_and_Collinearity.doc This handout shows how to carry out multiple regression analysis in SAS, and check collinearity diagnostics. There is also an example of using the ODS system in SAS to capture output in a data set.
  • multiple_regression.sas These are the SAS commands that go along with the handout on multiple regression and collinearity above.

  • ANCOVA in SAS
  • revised_ANCOVA_Examples_Using_SAS.doc *REVISED* This handout shows how to carry out an analysis of covariance (ANCOVA) using SAS, using two examples. The cars example has been revised.
  • revised_ancova_example.sas These are the (revised) SAS commands that go along with the handout on analysis of covariance above.

  • Regression Selection Methods in SAS
  • regression_selection.doc This handout shows how to select models in SAS using Stepwise selection, Backward selection, All Possible Regressions, Adjusted R-square, and Mallow's CP.
  • regression_selection.sas These are the SAS commands that go along with the handout on analysis of covariance above.

  • SPSS Demo in Computer Lab
  • Demo1.SPS SPSS commands that were demonstrated in Computer lab SPSS orientation session.

  • Descriptives and t-tests in SPSS
  • spss_ttest.doc This handout shows how to create an SPSS data set from a raw data file, how to create new variables, and how to carry out independent samples, paired samples, and one-sample t-tests.
  • descriptives_ttest.sps SPSS syntax that goes with the handout above.

  • Simple Regression and Dummy Variable Regression in SPSS
  • simple_reg_SPSS.doc This handout shows how to carry out a simple regression using SPSS, how to create dummy variables, and how to carry out a dummy variables regression using SPSS.
  • simple_regression.sps SPSS syntax that goes with the handout above.

  • Multiple Regression with Collinearity Diagnostics and Regression Selection Methods in SPSS
  • Multiple_Regression_SPSS.doc This handout shows how to carry out multiple regression analysis in SPSS, and check collinearity diagnostics. Stepwise and backward selection methods are also illustrated, along with entering vairables in a regression model in blocks.
  • multiple_reg.sps These are the SPSS commands that go along with the handout on multiple regression with collinearity diagnostics above.

  • ANCOVA in SPSS
  • ANCOVA_Examples_Using_SPSS.doc This handout shows how to carry out an analysis of covariance (ANCOVA) using SPSS using the htwt data set.
  • ancova.sps These are the SPSS commands that go along with the handout on analysis of covariance above.

  • Frequency Tabulations and Contingency Tables in SAS
  • revised_frequencies.doc This (revised) handout shows how to get one-way frequencies for categorical variables, and cross-tabulations (contingency tables) using SAS. Odds ratios and relative risks are calculated for 2x2 tables, and measures of association are illustrated for ordinal variables. The Mantel-Haenszel method for combining information across levels of a stratifying variable is also illustrated.
  • revised_frequencies.sas This SAS command file contains commands for the frequency tabulations in the handout above.
  • WERNER2.DAT This data set can be used for the frequency tabulations illustrated in the handout above.

  • Comparison of Proportions and Agreement for Matched Categorical Data in SAS
  • matched_freq.doc This handout shows how to match observations from a data set to add new variables, and then how to do McNemar's test for matched proportions, using Proc Freq. Cohen's kappa and weighted kappa are also illustrated.
  • matchfreq.sas This SAS command file contains commands for the matched frequency tabulations in the handout above.
  • werner.sas7bdat This permanent SAS data set can be used for the analyses illustrated in the handout above.

  • Frequency Tabulations and Contingency Tables in SPSS
  • frequencies_SPSS.doc This handout shows how to recode variables to create categorical variables from continuous variables, get one-way frequencies for categorical variables, and cross-tabulations (contingency tables) using SPSS. Odds ratios and relative risks are calculated for 2x2 tables, and measures of association are illustrated for ordinal variables. The Mantel-Haenszel method for combining information across levels of a stratifying variable for 2x2 tables is also illustrated.
  • frequencies.sps This SPSS command file contains commands for the frequency tabulations in the handout above.
  • werner.sav This data set can be used for the frequency tabulations illustrated in the handout above.

  • Logistic Regression in SAS
  • logistic_2006.doc This handout shows how to carry out logistic regression for a single continuous predictor, for categorical predictors, and for a mix of variable types. Logistic regression is illustrated using Proc Logistic, and Proc Gemod.
  • logistic.sas This SAS command file contains commands for the logistic regressions in the handout above.
  • brca.dat This data set can be used for the logistic regression analyses illustrated in the handout above.
  • logistic_with_ods_graphics.doc This handout illustrates how to get SAS output into an rtf (rich text format) file, and generate a plot of the predicted values versus the values of a continuous predictor (AGE).

  • Logistic Regression in SPSS
  • logistic_regression_SPSS.doc This handout shows how to carry out logistic regression for a single continuous predictor, for categorical predictors, and for a mix of variable types using SPSS.
  • logistic_regression.sps This SPSS syntax file contains commands for the logistic regressions in the handout above.
  • brca.dat This data set can be used for the logistic regression analyses illustrated in the handout above.

  • You can download homework assignments here:
  • homework1.doc
  • homework2.doc
  • homework3.doc
  • homework4.doc
  • homework5.doc
  • homework6.doc
  • homework7.doc
  • homework8.doc
  • homework9.doc

  • last updated: September 5, 2007