I'm an applied statistics student trying to get help understanding some SAS output and how to correct a problem I'm having. This is based on a hw problem I'm answering, but I promise if you answer I promise this doesn't violate any academic dishonesty policy or anything, the hw is not graded I just need to turn it in, but I want to try and get it correct and understand it before I do. Anyhow...
This is based on based on Design and Analysis of Experiments by Angela Dean and Daniel Voss. In an example in that text they describe how an equality of slopes test can be run on a covariate using the code:
Proc GLM;
CLASS COLOR;
MODEL INFTIME=COLOR X COLOR*X;
RUN;
and the results:
| ||||||||||||||||||||||||
| ||||||||||||||||||||||||
| ||||||||||||||||||||||||
|
and that
/*The interaction term X*COLOR will be significantly different from zero if the
linear run order trends are not the same for each TRTMT. (X is for run order)*/
Now, since the p-value for X*COLOR is 0.3108, the interpretation is that interaction is not significantly different from zero so the run order trends are the same for each TRTMT, meaning the equal slopes model can be used.
My main problem is that I'm trying to run this same test on a different data set but when I run the test I have no error df and thus I get no F or p-values. My code is:
Proc GLM;
class TRTMT;
model ABSORB=TRTMT RATE TRTMT*RATE;
run;
my results are:
| ||||||||||||||||||||||||
| ||||||||||||||||||||||||
| ||||||||||||||||||||||||
|
and then I can't make any conclusion. How do I adjust in order to have error df. My only thought is to also assign TRTMT as a covariate and then I get:
Proc GLM;
class ;
model ABSORB=TRTMT RATE TRTMT*RATE;
run;
and
| |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| |||||||||||||||||||||||||
|
and I can interpret that again in this data set interaction is not significant and thus the equal slopes model would be correct to use. But, I don't think this is correct because TRTMT isn't supposed to be a covariate and by assigning it as such I think I'm completely changing the model.
Thanks for any help you can give!
TRT is a covariate in both models, but in the first it is treated as a categorical variable and in the second it is treated as a continuous variable.
Two things to check:
1) Run a proc freq of your data for trt*rate such as
proc freq data=have;
table trtmt*rate;
run;
2) a Proc means on the rate variable and see the output
proc means data=have;
class trtmt;
var rate;
run;
I'm guessing one of those will show what's wrong with your model.
Jacob,
The problem here
Proc GLM;
class TRTMT;
model ABSORB=TRTMT RATE TRTMT*RATE;
run;
is that TRTMT has 6 levels and you only have twelve observations. Therefore your model is overparameterized to check for equality of slopes across all treatments. I would generally consider the first model to be overparameterized as well, just not so much as to be mathematically degenerate (You fail to reject the equal slopes assumption, but you have so little power that you really can't accept it either). Harrell, in his regression modelling strategies book, recommends at least 15 observations per degree of freedom tested in a linear model to have a chance to obtain stable results.
Doc Muhlbaier
Duke
Thank you, that was a very helpful explanation.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.