BookmarkSubscribeRSS Feed
MayTrix
Calcite | Level 5

I am running a statistical analysis for an experiment where subjects were randomly selected.  A strength measurement was taken at the same two locations (location) for each participant. The strength measurement was taken twice with two different methods (method). So there are 4 measurements for each participant.  We would like to determine if gender impacts the strength.  To do this we ran the following model:


proc mixed data=set;

  class IDnum Sex method location;

  model strength =  Sex | method | location;

  random IDnum(Sex);

run;

The nested effect (IDnum(sex)) is considered to be random. But does this take into account the variability due to individuals themselves? Would I need to modify the random statement as follows:

random IDnum(Sex) IDnum;

2 REPLIES 2
SteveDenham
Jade | Level 19

This random term is the residual error for your design, and doesn't need to be explicitly stated in the random statement.  Now, if you consider location to be a repeated factor (which I would), then perhaps the following code would be appropriate:

proc mixed data=set;

  class IDnum Sex method location;

  model strength =  Sex | method | location;

repeated location/subject=IDnum(sex);

run;

This syntax for IDnum(sex) is necessary only if there are duplicate IDnum's that might be distinguished by sex (for instance, 101 in males, and 101 in females).  If IDnum is unique across sex, the syntax will work, but is not necessary.

The statement

random IDnum(Sex) IDnum;

will almost surely lead to a message that the 'G matrix is not positive definite' as it is redundant.

Steve Denham

MayTrix
Calcite | Level 5

Thank you Steve for responding to my question. It was very helpful.

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
  • 2 replies
  • 1377 views
  • 4 likes
  • 2 in conversation