Programming the statistical procedures from SAS

Proc Mixed with Group Level outcome

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Proc Mixed with Group Level outcome

 

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;


Accepted Solutions
Solution
‎04-11-2018 08:28 AM
New Contributor
Posts: 3

Re: Proc Mixed with Group Level outcome

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


All Replies
Solution
‎04-11-2018 08:28 AM
New Contributor
Posts: 3

Re: Proc Mixed with Group Level outcome

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. 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 173 views
  • 0 likes
  • 1 in conversation