BookmarkSubscribeRSS Feed
DPFW
Calcite | Level 5

Hi all,

  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;

model Y=A|B;

run;

  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.  

1 REPLY 1
SteveDenham
Jade | Level 19

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.

Steve Denham

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 1 reply
  • 1503 views
  • 0 likes
  • 2 in conversation