COOCHE@QUCDN.BITNET (Evan G. Cooch) (02/07/90)
Arnold Kester reported what he believed to be a problem with one of the suggested approaches to paired slopes comparisons in ANCOVA. He provided the following data set to use in his example. +----------------------------------------------------------+ 1 | Example data set from Arnold Kester - STAT-L submission | | on February 6, 1990 | +----------------------------------------------------------+ TRT X Y 1 1 2 1 2 2 1 3 4 1 4 3 1 5 5 1 6 6 2 1 2 2 2 3 2 3 4 2 4 3 2 5 2 2 6 4 2 8 3 1 He then used the following code to point out what he perceived to be an error: PROC GLM; CLASS TRT; MODEL Y=X TRT TRT*X; ESTIMATE 'A v B' TRT 1 -1; He then noted that the interaction term in the model (TRT*X) was significant, but that the t-value in the ESTIMATE results was not. He inferred that there was an error in the logic. However, he also noted that the t-value (-1.79) is equivalent to the type III F for the TRT in the ANOVA table of F=3.22. The reason for this discrepancy is due to a coding error on Arnold's part. What he should have used was PROC GLM; CLASS TRT; MODEL Y=X TRT TRT*X; ESTIMATE 'A v B' TRT*X 1 -1; It is the use of the TRT*X term in the ESTIMATE statement which gives the correct test. Incidentally, it may be more useful (and instructive in this example) to use the CONTRATS statement rather than the ESTIMATE statement, since the former gives you the F-stat directly. For example, using CONTRAST 'A v B' TRT*X 1 -1; +----------------------------------------------------------+ 5 | Example data set from Arnold Kester - STAT-L submission | | on February 6, 1990 | +----------------------------------------------------------+ GENERAL LINEAR MODELS PROCEDURE DEPENDENT VARIABLE: Y SOURCE DF SUM OF SQUARES MEAN SQUARE F VALUE MODEL 3 12.89409416 4.29803139 6.58 ERROR 9 5.87513661 0.65279296 PR > F CORRECTED TOTAL 12 18.76923077 0.0120 R-SQUARE C.V. ROOT MSE Y MEAN 0.686980 24.4266 0.80795604 3.30769231 SOURCE DF TYPE I SS F VALUE PR > F X 1 4.54143707 6.96 0.0270 TRT 1 2.41424208 3.70 0.0866 X*TRT 1 5.93841500 9.10 0.0146 SOURCE DF TYPE III SS F VALUE PR > F X 1 9.14714624 14.01 0.0046 TRT 1 2.10194179 3.22 0.1063 X*TRT 1 5.93841500 9.10 0.0146 CONTRAST DF SS F VALUE PR > F A V B 1 5.93841500 9.10 0.0146 Using this code, we see that the F for the TRT*X term in the ANOVA is the same as the F derived for the CONTRAST statement. -------- I hope that this clears this part up, at least. _///_ -. .- ( L ) \//// +---------------------------+ --(\=/)-- ( ) | Evan G. Cooch | / \ / / | Department of Biology | I V / | Queen's University | I / | Kingston, Ontario, Canada | I / | (613-545-6129) | +---------------------------+