[
Data Screening ||
Matrix Algebra with SAS/IML ||
Regression analysis ||
General Linear Models ||
Canonical correlation, Discriminant analysis ||
Logistic Regression ||
Factor Analysis ||
Clustering and scaling ||
SAS macro programs ||
Data sets ||
Programs]
These tutorial examples use a few different data sets to illustrate
a variety of methods involved in regression analysis.
- autocox.sas
- Box-Cox transformation for the Auto data.
Uses the BOXCOX macro to find a power transformation of MPG.
- basecox.sas
- Box-Cox transformation for the Baseball data.
Uses the BOXCOX macro to find a power transformation of Salary.
- bisqdunc.sas
- Robust Regression - Duncan data. Uses the BISQUARE macro.
- bisqfuel.sas
- Robust Regression - Fuel data. Uses the BISQUARE macro.
- bloodreg.sas
- Testing homogeneity of regression.
Compares models with different slopes and intercepts in the BLOOD data.
- bootdunc.sas
- Bootstrap Regression - Duncan data. Uses the BOOT macro.
- crossval.sas
- Plot of predictive R-square, showing effects of shrinkage.
- detroit1.sas
- Predicting Detroit homicide rates. See the description of DETROIT.SAS under Data sets.
- detroit2.sas
- Stepwise selection methods on Detroit Homicide data.
- evappca.sas
- Incomplete principal components regression.
- fitbipl.sas
- Fitness data: Biplot.
- fitcp.sas
- Fitness Data: CP Plot.
- fitcolin.sas
- Fitness Data: Collinearity diagnostics.
- fitinfl.sas
- Fitness Data: Influence plot, bubble proportional to Cook's Distance
- fitness2.sas
- Influence diagnostics and partial residual plots
- fitness3.sas
- Various selection methods for Fitness data
- fitness4.sas
- Cross validation of a regression model.
We hold back a portion of the data from the fit, and evaluate how well the
model predicts in the hold-back sample.
- fitpart.sas
- Fitness data: Partial residual plots.
- fitstep.sas
- Illustrate stepwise selection using the Fitness Data.
- fuelcox.sas
- Fuel Consumption: Box Cox Transformation Plots.
- fuelcp.sas
- C(p) and related plots for fuel data.
- fuelerr.sas
- Fuel Consumption: Demonstrates effects of errors-in-predictors.
- fuelinfl.sas
- Fuel Consumption: Influence Plot.
Uses the INFLPLOT macro to show the influence of a few observations on
prediction of fuel consumption.
- fuelpart.sas
- Fuel data: Partial residual plots
- fuelr1.sas
- Fuel data: Building a regression model
- health.sas
- Suppression effects: Health, Height and Weight
- mregppvt.sas
- Multivariate multiple regression
- regdemo.sas
- Regression example, using SAS/IML.
A set of SAS/IML modules to carry out regression computations and hypothesis
tests. Duplicates PROC REG facilities, while the IML program shows how
it's done.
- reginfl.sas
- Influential Observations in Multiple Regression.
Fictitious data to illustrate various combinations of residual and leverage to
produce influential observations.
- robdunc.sas
- Robust Regression - Duncan data, using the ROBUST macro.
- robfuel.sas
- Bisquare Robust Regression - Fuel data, using the ROBUST macro.
- robreg.sas
- Robust Regression using IRLS(via PROC NLIN; superceded by ROBUST macro).
- scatfuel.sas
- Fuel data: scatterplot matrix
- stepsim.sas
- Stepwise regression simulation example NO real predictors.
The maxim
if you torture the data long enough, you can make it confess to
anything
is illustrated by constructing 100 random predictors, all
statistically independent of the response. How many do you suppose will
be significant at the .05 level?
- stepsim2.sas
- Stepwise simulation experiment: add random predictors to Fitness Data.
What do you think happens if you throw a whole bunch of random predictors into stepwise regression
with a real data set?
- suppress.sas
- Demonstrate suppression effect. Fictitious data on
three variables are used to illustrate a situation in which an additional
variable can make a greater extra contribution to regression, SSR(X2|X1), than it does by itself, SSR(X2).
- suppres2.sas
- Partial residual plots for supression example
- therboot.sas
- Simple Regression: Bootstrap samples and estimates
- turnip.sas
- Lurking variables: Turnip Green Data. Plots of results
from a model to predict
the quantity of Vitamin B2 in turnip greens
reveal a surprising and unsuspected lurking variable.