Docsity

Statistical Programming - Sample Homework 1 - Fall 2004 | STA 402, Assignments of Statistics

Toggle sidebar
bg1
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.
pf2

Partial preview of the text

Download Statistical Programming - Sample Homework 1 - Fall 2004 | STA 402 and more Assignments Statistics in PDF only on Docsity!

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. 91.0 64. 100.0 43. 68.0 67. 87.0 56. 73.0 73. 78.0 68. 80.0 56. 65.0 76. 84.0 65. 116.0 45. 76.0 58. 97.0 45. 100.0 53. 105.0 49. 77.0 78. 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.