Back
to STA 302 Home Page
STA 302 / 1001 -- Regression Analysis
-- Fall 2003
SAS examples from lecture:
-
September 8, 2003 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)
-
September 17, 2003 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)
-
September 26, 2003 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)
SAS code with simple option to get summary statistics (text)
(I should have done this in the previous output, but I forgot!)
SAS output for simple option (text)
-
October 15, 2003 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)
-
October 15, 2003 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)
-
October 15, 2003 Crime example residual plots:
Residuals versus predicted values plot (pdf)
Normal probability plot of residuals (pdf)
-
October 15, 2003 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)
-
October 20, 2003 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)
- Chicago house sales (November 5):
Data (text)
SAS code (text) Modified November 12 to add correlation matrix and again
at end of day to add matrices
SAS output (text) Modified November 12 to add correlation matrix and again
at end of day to add matrices
Pairwise scatterplots of all variables (pdf)
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)
- Rainfall and corn yield (November 12):
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)
- Meadowfoam experiment (November 12):
Data (text)
SAS code (text)
SAS output (text)
Plot of number of flowers per plant versus light intensity,
coded for timing (pdf)
- Brain size in mammals (November 12):
Data (text)
Pairwise scatterplots of raw data (pdf)
Pairwise scatterplots of log data (pdf)
SAS code (text)
SAS output (text)
- Life expectancy (December 1):
Data (text)
SAS code (text)
SAS output (text)
Scatterplot of raw data (pdf)
Scatterplot of logged data (pdf)
Plot of residuals versus predicted values (pdf)
Plot of residuals versus log of income (X) (pdf)
Normal probability plot of residuals (pdf)
- More on the meadowfoam example (December 1):
SAS code (text)
SAS output (text)
- Bats example (December 1):
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