07-29-2015 04:46 PM
I am using proc GLM to analyze some data. I want to specify the error term that is used to test certain factors. In other words I don't want all the factors tested over the mean square error (MSE). For example, imagine I have two factors A and B and their interaction A*B. I would like to test A over A*B and B over A*B and then have A*B tested over the MSE. I don't know how to specify the error term. Can someone help?
Here's my code:
proc glm data=work.myexcel;
class A B;
Obviously if I do it like it is currently written A and B and A*B are tested over the MSE. I'm not having much luck finding how to do this, but I know it can be done (and I'd imagine it's pretty easy to do). I would appreciate any help anyone can give. Thanks!!
P.S. A and B are fixed factors, not rand if that matters at all.
07-30-2015 03:44 PM
You need to look at the TEST statement.
For your example, two statements:
test h=A e=A*B;
test h=B e=A*B;
To answer your PS, yes it does matter if they are fixed or random. However, when you state that the error term is A*B, you are explicitly calling a fixed effect a random effect. If A and B are fixed, then I don't understand how A*B can be anything but fixed, and at this stage of things, I like my denominators in F tests to refer to something on the random side. But that is just me.