BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
smrose
Fluorite | Level 6

 

I'm trying to model a group level attribute that is only measured once during study using individual level predictor that was measured anywhere from 1 to 111 times/per person with 660 observations and 60 people.   How do I specify that my outcome  is a group level attribute that has only been measured once per subject?  I think with code my outcome is being analyzed as if it were dis-aggregated across all time points. 

 

 

proc mixed data = analysis.labshmp9 noclprint empirical ;
class subjectid ;
model sspg = shannon | shannon /solution ;
repeated / subject = subjectid ;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
smrose
Fluorite | Level 6

So after thinking about it some more I realized the repeated statement did not make sense in the context because my outcome was not repeated.  That meant to specify my subgroups I needed to use the random statement. The only thing that could randomly varies in the model are the level 1 observations.  So I ended up fitting a model like this: 

 

proc mixed data = dataset noclprint namelen=32 covtest plots = all ;
class subjectid ;
model SSPG = shannonc /solution ddfm = bw cl ;
random shannonc /subject = subjectid;
run;

 

the degrees of freedom were reasonable. 

View solution in original post

1 REPLY 1
smrose
Fluorite | Level 6

So after thinking about it some more I realized the repeated statement did not make sense in the context because my outcome was not repeated.  That meant to specify my subgroups I needed to use the random statement. The only thing that could randomly varies in the model are the level 1 observations.  So I ended up fitting a model like this: 

 

proc mixed data = dataset noclprint namelen=32 covtest plots = all ;
class subjectid ;
model SSPG = shannonc /solution ddfm = bw cl ;
random shannonc /subject = subjectid;
run;

 

the degrees of freedom were reasonable. 

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
  • 1366 views
  • 0 likes
  • 1 in conversation