BookmarkSubscribeRSS Feed
Gilles-Protais
Obsidian | Level 7

greetings everyone,
I just have a small question, I am in situation where i have r-family and have n-individuals belonging to these families (r<n), thus am to add a random effect (intercept) to my generalized linear mixed poison model to account for the design.  Additionaly, i have don't have repeated measurements, hence i was wondering whether to also include a  random slope, does this makes sense? and why? 
thanks.

5 REPLIES 5
Ksharp
Super User
It looks like a classical Mixed Model for SiteId and SubjectId. Like:
proc mixed .........
........
random int/subject=individual(family);
run;

Anyway , @SteveDenham @lvm @StatDave could give you more useful information.
SteveDenham
Jade | Level 19

Some more information would help, especially regarding the repeat measurement issue mentioned by the OP. Are there multiple measurements per subject or not?

 

SteveDenham

Gilles-Protais
Obsidian | Level 7
Yes there are multiple measurements per subject
SteveDenham
Jade | Level 19

For a Poisson model with nested random effects, and repeated measures on the lowest level units, consider this:

 

proc glimmix data=yourdata method=quad;
class subject family time;
model response=time/dist=poisson s;
random intercept family/subject=subject type=chol;
random time/subject=subject(family) type=vc;
lsmeans time/diff ilink;
store out=glmm_store;
run;

Provided that this converges, you should be able to compare counts at the various time points. If there are other factors in the model, they can be accommodated. This code will return least squares means for each time point, both on the log scale and the observed scale and differences on the log scale and associated ratios on the observed scale. The STORE creates a binary file that, in combination with PROC PLM and the %NLmeans macro, can be used to get the differences on the observed scale and the appropriate standard errors of the difference on the observed scale. Search @StatDave 's posts in this community for links to the use of the %NLmeans macro.  And speaking of @StatDave , he may be able to point to the use of PROC GEE if you are interested in marginal results rather than the conditional results from GLIMMIX.

 

SteveDenham

 

Ksharp
Super User
@SteveDenham
Since it is a repeated measure experiment, TIME should be R side random effect ,right?
random time/subject=subject(family) type=vc;
-->
random time/subject=subject(family) type=vc residual ;

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
  • 5 replies
  • 628 views
  • 2 likes
  • 3 in conversation