Date: Sun, 9 May 2004 09:59:57 -0500 Reply-To: "Copeland, Laurel" Sender: "SAS(r) Discussion" From: "Copeland, Laurel" Subject: Re: Problem with SAS code for linear contrasts Comments: To: DG Content-Type: text/plain If you comment out the contrast, you will see that the model cannot be estimated, regardless of the contrast. Comment out the CLASS statement to see why. Each level of CELL has only 1 value so there is no variance. Leave CLASS commented out but engage CONTRAST to get non-zero estimates (below); this contrast essentially creates a new class variable for you - you may wish to hard code it and put it in the CLASS statement. Is this the desired model? What is the purpose of the variable "ACCURACY" which does not currently appear in your model? I don't understand your data but hope this helps. -Laurel The GLM Procedure Dependent Variable: completion Sum of Source DF Squares Mean Square F Value Pr > F Model 1 0.02216155 0.02216155 0.05 0.8176 Error 25 10.20288719 0.40811549 Corrected Total 26 10.22504874 R-Square Coeff Var Root MSE completion Mean 0.002167 17.56250 0.638839 3.637519 Source DF Type III SS Mean Square F Value Pr > F cell 1 0.02216155 0.02216155 0.05 0.8176 Contrast DF Contrast SS Mean Square F Value Pr > F control vs treatment 1 0.02216155 0.02216155 0.05 0.8176 Standard Parameter Estimate Error t Value Pr > |t| Intercept 3.586022792 0.25288282 14.18 <.0001 cell 0.003678266 0.01578464 0.23 0.8176 -----Original Message----- From: DG [mailto:digupta1@VT.EDU] Sent: Sunday, May 09, 2004 9:10 AM To: SAS-L@LISTSERV.UGA.EDU 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 . . -------------------------------------------------------------

Back to: Top of message | Previous page | Main SAS-L page