SAS Lab 5.
Diagnostic Plots in Regression
In class we are currently covering various diagnostic plots to look for violations of the assumptions of a linear regression model. In these labs we shall see how such plots can be created in
SAS.
1. Simple Linear

TERM TEST 1
DAY CLASS
DURATION OF EXAMINATION: 45 Minutes
THIS EXAMINATION PAPER INCLUDES 5 PAGES AND 3 QUESTIONS. YOU ARE RESPONSIBLE
FOR ENSURING THAT YOUR COPY OF THE PAPER IS COMPLETE. BRING ANY DISCREPANCY TO THE ATTENTION OF YOUR INVIGILATOR.
Instuc

Assignment #2
Let me stress again the importance of becoming comfortable with manipulating multivariate functions. It is, therefore, extremely important that at the beginning of this course you make a concerted
effort to stay up-to-date. This involves rea

SAS Lab 6.
Further Diagnostic Plots in Regression
In last weeks lab we examined many of the diagnostic plots that are available in SAS. Some
of the plots described in your textbook and the course, however, are not directly available.
The information to co

SAS Lab 1.
Topics Covered in this Lab
1. The SAS Editor.
2. Libnames
3. Importing data from plain text files using PROC IMPORT.
4. PROC PRINT.
5. PROC MEANS.
6. Saving your SAS output.
1. The SAS Editor: When you open SAS one of the windows available is t

SAS Lab 9
Transformations
It is relatively easy to fit transformations in SAS. All that is really necessary is to use a Data step
to construct the transformed variables and then use either PROC REG or PROC GLM to fit the model.
The functions Log and Sqrt

Assignment #1
This assignment is due at the beginning of class on Monday, September 10, 2007. You must submit
all problems that are marked with an asterix (*).
1.
* Send me an email to say Hello. If I have never taught you before, tell me a bit about your

SAS Lab 4.
This will be a revision lab to ensure you properly understand the features used in the previous
three labs. The important things you need to know at this point are:
1. Importing datasets from text files.
2. Use of the Data Step to create new va

Assignment #9
This assignment is due at the beginning of class on Friday, November 30, 2007. You must submit
solutions to all problems. As indicated on the course outline, solutions will be graded for both
content and clarity of exposition. The solutions

SAS Lab 2.
Topics Covered in this Lab
1. PROC PLOT
2. PROC GPLOT
3. PROC CORR
4. PROC REG
1. PROC PLOT This procedure creates scatter plots. The basic form of the PROC is
PROC PLOT Data=S3A3.Heights;
Plot Dheight*Mheight;
run;
In the Plot statement the fi

Assignment #5
This assignment is due at the beginning of class on Friday, October 5, 2007. You must submit
solutions to all problems. As indicated on the course outline, solutions will be graded for both
content and clarity of exposition. The solutions th

SAS Lab 11
Note that this is your final SAS lab for the course.
This Lab will cover variable selection using SAS PROC REG.
All Possible Regressions
SAS will do all possible regressions for a given set of covariates and produce model selection
criteria for

TERM TEST 2
.
DAY CLASS
DURATION OF EXAMINATION: 45 Minutes
THIS EXAMINATION PAPER INCLUDES 6 PAGES AND 3 QUESTIONS. YOU ARE RESPONSIBLE
FOR ENSURING THAT YOUR COPY OF THE PAPER IS COMPLETE. BRING ANY DISCREPANCY TO THE ATTENTION OF YOUR INVIGILATOR.
Inst

Assignment #7
This assignment is due at the beginning of class on Friday, November 9, 2007. You must submit
solutions to all problems. As indicated on the course outline, solutions will be graded for both
content and clarity of exposition. The solutions t

SAS Lab 7
In this lab we shall cover the use of PROC REG and PROC GLM to fit models which have categorical
variables as the covariates.
One-Way ANOVA
The one-way ANOVA procedure is used when we wish to test the equality of two or more group
means. Again t

Assignment #3
This assignment is due at the beginning of class on Monday, September 24, 2007. You must submit
solutions to all problems. As indicated on the course outline, solutions will be graded for both
content and clarity of exposition. The solutions

SAS Lab 8
Categorical and Continuous Covariates
We can combine continuous covariates in a single linear model to give different lines for different
levels of a categorical variable in a process that is sometimes called Analysis of Covariance
(ANCOVA). The

SAS Lab 10
Weighted Least Squares
Weighted least squares can be done either using a transformation model as we saw in class
or using the weight statement in PROC REG or PROC GLM. The data in HeteroData.txt were
simulated to have variance proportional to x

SAS Lab 3.
Topics Covered in this Lab
1. The Data step
2. Using SAS to get p-values or critical values
3. Multiple Regression
4. Prediction
1. The Data Step
The Data step can be used to directly input the values for a dataset.
Data Mydata;
Input Y X1 X2 X

Assignment #8
This assignment is due at the beginning of class on Wednesday, November 14, 2007. You do not
need to submit any problems for grading.
1.
Exercise 7.1, page 134
2.
Problem #9, page 144
Problem #10, page 145
Problem #11, page 145
Problem