STA 302H1F / 1001HF -- Methods of Data Analysis I
-- Fall 2009
SAS examples from lecture:
CFCs on Mauna Loa example: (modified October 10 to add plots of studentized residuals)
Data January 1977 to December 1993 (text)
Data December 1994 to December 2004 (text)
SAS code (text)
SAS log (text)
SAS output (.lst) (text)
Plot of CFCs vs time (pdf)
Before the Montreal Protocol: Plot of CFCs vs time with regression line (pdf)
Before the Montreal Protocol: Plot of residuals versus time (pdf)
Before the Montreal Protocol: Plot of residuals versus predicted values (pdf)
Before the Montreal Protocol: Plot of studentized residuals versus predicted values (pdf)
Before the Montreal Protocol: Normal quantile plot of residuals (pdf)
Before the Montreal Protocol: Normal quantile plot of studentized residuals (pdf)
After the Montreal Protocol: Plot of CFCs vs time with regression line (pdf)
After the Montreal Protocol: Plot of residuals versus time (pdf)
After the Montreal Protocol: Plot of residuals versus predicted values (pdf)
After the Montreal Protocol: Plot of studentized residuals versus predicted values (pdf)
After the Montreal Protocol: Normal quantile plot of residuals (pdf)
After the Montreal Protocol: Normal quantile plot of studentized residuals (pdf)
Anscombe example (4 made-up datasets):
SAS code (including data) (text)
SAS output (text)
Scatterplot of y1 vs x1 (pdf)
Scatterplot of y2 vs x1 (pdf)
Scatterplot of y3 vs x1 (pdf)
Scatterplot of y4 vs x2 (pdf)
Scatterplot of y1 vs x1 with regression line (pdf)
Scatterplot of y2 vs x1 with regression line (pdf)
Scatterplot of y3 vs x1 with regression line (pdf)
Scatterplot of y4 vs x2 with regression line (pdf)
Smoking and cancer example:
Data (text)
SAS code (text)
SAS output (.lst) (text)
Scatterplot (pdf)
Scatterplot with regression line (pdf)
Plot of residuals versus smoking index (pdf)
Plot of residuals versus predicted values (pdf)
Crime and population example:
SAS code (including data) (text)
SAS output (text)
Scatterplot of Number of violent crimes vs Population (all data points) (pdf)
Scatterplot of Number of violent crimes vs Population (all data points) with regression line (pdf)
Scatterplot of Number of violent crimes vs Population with regression line with New York City deleted (pdf)
Scatterplot of Number of violent crimes vs Population with regression line with New York City, Boston and Washington deleted (pdf)
Non-technical description of analyses including and not including New York (text)
SAS code with simple option on proc reg
SAS output with simple option on proc reg
CFCs example with confidence and prediction intervals:
SAS code (text)
SAS output (text)
Plot of confidence intervals for mean of Y, pre Montreal Protocol (jpg)
Plot of prediction intervals for Y, pre Montreal Protocol (jpg)
Plot of confidence intervals for mean of Y, post Montreal Protocol (jpg)
Plot of prediction intervals for Y, post Montreal Protocol (jpg)
Plots of confidence and prediction intervals for smoking and cancer example:
Plot of confidence intervals for mean of Y (pdf)
Plot of prediction intervals for Y (pdf)
Normal quantile plots for simulated data (for Chapter 3):
Data are random sample of size 10 from standard normal distribution
Data are a second random sample of size 10 from standard normal distribution
Data are random sample of size 50 from standard normal distribution
Data are random sample of size 100 from standard normal distribution
Data are random sample of size 100 from t distribution with 2 df (heavy tails)
Data are random sample of size 100 from chisquare distribution with 10 df (right-skewed)
Crime example residual plots (for Chapter 3):
Residuals versus predicted values plot (pdf)
Studentized residuals versus predicted values plot (pdf)
Normal quantile plot of residuals (pdf)
Normal quantile plot of studentized residuals (pdf)
Crime example influence statistics:
SAS code (text)
SAS output (text)
Corrosion example (for Chapter 3):
SAS code (including data) (text)
SAS output (text)
Scatterplot with regression line (pdf)
Plot of residuals versus predictor variable (pdf)
Plot of residuals versus fitted values (pdf)
Normal quantile plot of residuals (pdf)
Sequence plot of residuals (pdf)
Plot of absolute value of residuals versus fitted values (pdf)
Breakdown example (for Chapter 3): (plots of studentized residuals added October 9)
SAS code (text)
Data (text)
SAS output file (text)
Scatter plot for untransformed data with regression line (pdf)
Residuals versus X plot for untransformed data (pdf)
Studentized residuals versus X plot for untransformed data (pdf)
Residuals versus predicted values plot for untransformed data (pdf)
Normal quantile plot of residuals for untransformed data (pdf)
Scatter plot for data with square root of Y with regression line (pdf)
Studentized residuals versus X plot for data with square root of Y (pdf)
Residuals versus predicted values plot for data with square root of Y (pdf)
Normal quantile plot of residuals for data with square root of Y (pdf)
Scatter plot for data with log of Y with regression line (pdf)
Studentized residuals versus X plot for data with log of Y (pdf)
Residuals versus predicted values plot for data with log of Y (pdf)
Normal quantile plot of residuals for data with log of Y (pdf)
Scatter plot for data with 1/Y with regression line (pdf)
Studentized residuals versus X plot for data with 1/Y (pdf)
Residuals versus predicted values plot for data with 1/Y (pdf)
Normal quantile plot of residuals for data with 1/Y (pdf)
Chicago house sales example (for Chapter 6):
Data (text)
SAS code (text)
SAS output (text)
Pairwise scatterplots of all variables (pdf)
Residuals versus first four predictor variables (pdf)
Residuals versus last four predictor variables (pdf)
Residuals versus fits and normal quantile plot of residuals (pdf)
Meadowfoam experiment (indicator variables and the partial F test (Chapters 7 and 8)):
Data (text)
SAS code (text)
SAS output (text)
More on the meadowfoam example (ANCOVA (Chapter 8)):
SAS code (text)
SAS output (text)
Plot of number of flowers per plant versus light intensity, coded for timing (pdf)
CFCs on Mauna Loa example, quadratic regression:
SAS code (text)
SAS output (text)
Rainfall and corn yield (Chapters 7 and 8):
Data (text)
SAS code (text)
SAS output (text)
Scatterplot of yield versus rainfall with simple regression line (jpeg)
Plot of residuals versus predicted values for simple regression (jpeg)
Plot of residuals versus predicted values for quadratic regression (jpeg)
Normal quantile plot of residuals for quadratic regression (jpeg)
Plot of residuals versus year for quadratic regression (jpeg)
House prices example with partial regression plots:
SAS code
SAS output
Brain size in mammals (multiple regression, log-log transformation):
Data (text)
Pairwise scatterplots of raw data (pdf)
Pairwise scatterplots of log data (pdf)
SAS code (text)
SAS output (text)