Back
to STA 302 Home Page
STA 302 / 1001 -- Regression Analysis
-- Summer 2004
SAS examples from lecture:
-
May 17, 2004 Meat processing example:
SAS code (including data) (text)
SAS output (text)
Plot of pH vs time (jpg)
Plot of pH vs log(time) (jpg)
Plot of pH vs log(time) with regression line (jpg)
Plot of residuals vs log(time) (jpg)
Plot of residuals vs predicted values (jpg)
-
May 19, 2004 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)
-
May 19 and 26, 2004 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)
- May 31, 2004 Cigarette Example:
SAS code (text)
SAS output (text)
-
May 31, 2004 Meat processing example with confidence and prediction intervals:
SAS code (including data) (text)
SAS output (including lineprinter plots) (text)
Plot of confidence intervals for mean of Y (pdf)
Plot of prediction intervals for Y (pdf)
-
June 2, 2004 Normal probability plots for simulated data:
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)
-
June 2, 2004 Corrosion example:
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 probability plot of residuals (pdf)
Sequence plot of residuals (pdf)
Plot of absolute value of residuals versus fitted values (pdf)
-
June 2, 2004 Meat example residual plots (before and after transformation):
Regression line for untransformed data (pdf)
Residuals versus predicted values plot for untransformed data (pdf)
Normal probability plot of residuals for untransformed data (pdf)
Residuals versus predicted values plot for transformed data (log of X) (jpg)
Normal probability plot of residuals for transformed data (log of X) (pdf)
-
June 2, 2004 Crime example residual plots:
Residuals versus predicted values plot (pdf)
Normal probability plot of residuals (pdf)
-
June 2, 2004 Breakdown example:
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)
Residuals versus predicted values plot for untransformed data (pdf)
Normal probability plot of residuals for untransformed data (pdf)
Scatter plot for data with square root of Y with regression line (pdf)
Residuals versus predicted values plot for data with square root of Y (pdf)
Normal probability plot of residuals for data with square root of Y (pdf)
Scatter plot for data with log of Y with regression line (pdf)
Residuals versus predicted values plot for data with log of Y (pdf)
Normal probability plot of residuals for data with log of Y (pdf)
Scatter plot for data with 1/Y with regression line (pdf)
Residuals versus predicted values plot for data with 1/Y (pdf)
Normal probability plot of residuals for data with 1/Y (pdf)
- June 14, 2004 Chicago house sales example:
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 probability plot of residuals (pdf)
- June 16, 2004 Brain size in mammals:
Data (text)
Pairwise scatterplots of raw data (pdf)
Pairwise scatterplots of log data (pdf)
SAS code (text)
SAS output (text)
- June 21, 2004 Rainfall and corn yield:
Data (text)
SAS code (text)
SAS output (text)
Scatterplot of yield versus rainfall (jpeg)
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 probability plot of residuals for quadratic regression (jpeg)
Plot of residuals versus year for quadratic regression (pdf)
SAS code for rain example with centring (text)
SAS output for rain example with centring (text)
- June 21, 2004 Meadowfoam experiment:
Data (text)
SAS code (text)
SAS output (text)
Plot of number of flowers per plant versus light intensity,
coded for timing (pdf)
- June 23, 2004 More on the meadowfoam example:
SAS code (text)
SAS output (text)
- June 23, 2004 Bats example:
Data (text)
Pairwise scatterplots (pdf)
SAS code (text)
SAS output (text)
Residual plot for regression of untransformed data (pdf)
Residual plot for regression of transformed (log) Y (energy) (pdf)
Residual plot for regression of transformed (log) Y (energy) and (log) X (mass) (pdf)
Scatter plot of transformed (log) Y (energy) and (log) X (mass) (pdf)
E-mail course instructor: alison.gibbs@utstat.utoronto.ca