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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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