|
|

Practice
Computer
Programs
SAS
headstart
SAS
procedures
Program
1
Program
2
Program
3
Program
4
Program
5
Program
6
Program
7
Program
8
Program 9
Program
10
Program
11
Program
12
Program
13
Program
14
Topical
Bibliographies (Readings)
Datasets
and Stories
Software
Help
Search
for
|

|
Program
9

OPTIONS LS=80 NODATE PAGENO=1;
TITLE 'Example 10, Y603';
DATA nested;
INPUT treat b score @@;
LABEL treat='Treatment levels, 1=games, 2=arts'
b ='levels of factor B, the nested factor';
CARDS;
1 1 3 1 1 6 1 1 3 1 1 3
1 2 1 1 2 2 1 2 2 1 2 2
1 3 5 1 3 6 1 3 5 1 3 6
1 4 2 1 4 3 1 4 4 1 4 3
2 5 7 2 5 8 2 5 7 2 5 6
2 6 4 2 6 5 2 6 4 2 6 3
2 7 7 2 7 8 2 7 9 2 7 8
2 8 10 2 8 10 2 8 9 2 8 11
;
PROC GLM;
CLASS treat b;
MODEL score=treat b(treat);
TEST H=treat E=b(treat);
TITLE2 'The correct analysis of a nested design';
PROC GLM;
CLASS treat;
MODEL score=treat;
TITLE2 'The incorrect analysis of a nested design';
RUN;
Example 10, Y603 1
The correct analysis of a nested design
General Linear Models Procedure
Class Level Information
Class Levels Values
TREAT 2 1 2
B 8 1 2 3 4 5 6 7 8
Number of observations in data set = 32
Example 10, Y603 2
The correct analysis of a nested design
General Linear Models Procedure
Dependent Variable: SCORE
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 7 217.00000000 31.00000000 40.22 0.0001
Error 24 18.50000000 0.77083333
Corrected Total 31 235.50000000
R-Square C.V. Root MSE SCORE Mean
0.921444 16.33435 0.8779711 5.3750000
Source DF Type I SS Mean Square F Value Pr > F
TREAT 1 112.50000000 112.50000000 145.95 0.0001
B(TREAT) 6 104.50000000 17.41666667 22.59 0.0001
Source DF Type III SS Mean Square F Value Pr > F
TREAT 1 112.50000000 112.50000000 145.95 0.0001
B(TREAT) 6 104.50000000 17.41666667 22.59 0.0001
Tests of Hypotheses using the Type III MS for B(TREAT) as an error term
Source DF Type III SS Mean Square F Value Pr > F
TREAT 1 112.50000000 112.50000000 6.46 0.0440
Example 10, Y603 3
The incorrect analysis of a nested design
General Linear Models Procedure
Class Level Information
Class Levels Values
TREAT 2 1 2
Number of observations in data set = 32
Example 10, Y603 4
The incorrect analysis of a nested design
General Linear Models Procedure
Dependent Variable: SCORE
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 1 112.50000000 112.50000000 27.44 0.0001
Error 30 123.00000000 4.10000000
Corrected Total 31 235.50000000
R-Square C.V. Root MSE SCORE Mean
0.477707 37.67155 2.0248457 5.3750000
Source DF Type I SS Mean Square F Value Pr > F
TREAT 1 112.50000000 112.50000000 27.44 0.0001
Source DF Type III SS Mean Square F Value Pr > F
TREAT 1 112.50000000 112.50000000 27.44 0.0001

Comments: peng@indiana.edu
Dr. Peng's Home Page: Dr.
Chao-Ying Joanne Peng
Copyright
1999, The Trustees of Indiana
University
|