Date: Sun, 9 May 2004 09:09:48 -0400
Reply-To: DG <digupta1@vt.edu>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: DG <digupta1@VT.EDU>
Organization: Virginia Tech, Blacksburg, Virginia, USA
Subject: Problem with SAS code for linear contrasts
I have a 3x3x3 within subjects design. I am doing a test of linear contrast
to compare performance between cells. I want to compare 3 cells with the
rest of the 24 cells. I am using SAS to perform the linear contrast however
I end up with no values for F and p in the output.
Can someone please check my SAS code and tell me where I am going wrong. I
have pasted both my input and output.
Thanks in advance.
DG
INPUT
options pageno=1 formdlim='-';
DATA distancehypothesis;
*cell 1, 2, 3 are matched conditions (control conditions);
INPUT cell completion accuracy;
CARDS;
1 4.042 3.604
2 4.167 3.875
3 2.667 2.250
4 4.104 3.771
5 2.563 2.146
6 4.021 3.521
7 4.208 3.813
8 2.771 2.271
9 3.979 3.583
10 4.125 3.771
11 2.438 1.896
12 4.021 3.708
13 4.271 3.896
14 2.896 2.458
15 4.125 3.708
16 2.917 2.625
17 3.938 3.625
18 4.104 3.771
19 3.000 2.458
20 4.021 3.750
21 4.125 3.646
22 2.938 2.479
23 3.875 3.438
24 4.042 3.667
25 2.896 2.479
26 4.021 3.708
27 3.938 3.688
;
proc glm;
CLASS cell;
MODEL completion = cell / ss3;
contrast 'control vs treatment' cell 8 8
8 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1;
run;
OUTPUT
The SAS System 18:02 Saturday, May 8, 2004 1
The GLM Procedure
Class Level Information
Class Levels Values
cell 27 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
27
Number of observations 27
----------------------------------------------------------------------------
-----------------------
The SAS System 18:02 Saturday, May 8, 2004 2
The GLM Procedure
Dependent Variable: completion
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 26 10.22504874 0.39327111 . .
Error 0 0.00000000 .
Corrected Total 26 10.22504874
R-Square Coeff Var Root MSE completion Mean
1.000000 . . 3.637519
Source DF Type III SS Mean Square F Value Pr > F
cell 26 10.22504874 0.39327111 . .
Contrast DF Contrast SS Mean Square F Value Pr > F
control vs treatment 1 0.00050112 0.00050112 . .
----------------------------------------------------------------------------
----------------------