
Homework 1
C:\Documents and Settings\John Bailer\My Documents\baileraj\
Classes\Fall 2004\hw\Homework-01.doc
Assigned: 27 August 2004
Due: 3 Sept. 2004
1. Download the data http://lib.stat.cmu.edu/datasets/sleep
Read these data into a SAS data set.
Make sure you reassign the missing code from -999.0 to .
(Hint: Use an “if” statement in a DATA block.)
Make sure that you identify animal name as a character
variable (Using $ after the variable declaration).
2. The following data on age and muscle mass was collected.
82.0 71.0
91.0 64.0
100.0 43.0
68.0 67.0
87.0 56.0
73.0 73.0
78.0 68.0
80.0 56.0
65.0 76.0
84.0 65.0
116.0 45.0
76.0 58.0
97.0 45.0
100.0 53.0
105.0 49.0
77.0 78.0
i. Create a text file containing this information.
ii. Use “infile” to bring these data into SAS.
iii. Produce summary statistics for each variable (use
UNIVARIATE)
iv. Generate a plot of muscle mass as a function of age
(use PLOT).
3. Generate data from an equally replicated one-way anova
model with 4 groups and means (15, 15, 18, 15) with a
standard deviation of 1.5. Assume that each group was
replicated five times. Hint: the “SAS system help” can
suggest syntax. Recall: if X ~ N(0,1), then sigma*X ~
N(0,sigma^2). Fit an anova model using PROC GLM. Report
the results.