BookmarkSubscribeRSS Feed
36792
Calcite | Level 5

I am using Glimmix to run a mixed model with a Poisson distribution. Here's the basic model layout:

proc glimmix noclprint=12 method=laplace;

class site year sht tb poscat efnbin;

model esm=efnbin tb efnbin*tb c_shtefn c_shtefn*tb c_shtefn*efnbin/dist=poisson link=log solution;

random year site year*site sht*year*site;



I want to estimate means for the "efnbin" effect with within-subject standard errors. The problem is specifying this in the ESTIMATE statement because there are over 800 levels of the "sht*year*site" random effect. So, my question is if there is a short-hand way to specify the same coefficient for all the >800 levels of "sht*year*site".


Thanks.

3 REPLIES 3
SteveDenham
Jade | Level 19

You don't need to do that.  It looks like you want best linear unbiased estimates and not BLUPs, so the least squares means should suffice for what you are looking for.

Try:

LSMEANS efnbin efnbin*tb /ilink;

This will give the main effect estimates across tb, and at each level of tb.  These will all be reported at the mean value of c_shtefn   If you want estimates at specific values of this continuous covariate you will need to include the AT= option I include the ILINK option to also present estimates on the original scale

Steve Denham

36792
Calcite | Level 5

I guess that I did not make myself very clear. I need to specify the random effects in an estimate statement in order to get the within-subject standard errors. The problem is coding the specification of the random effects given that there are so many levels.

SteveDenham
Jade | Level 19

So you do want the BLUP estimates, am I correct? Those would have within subject standard errors.  With >800 levels, ouch.  If you can accept the empirical Bayes estimates of the standard errors, try adding /solution to the random statement, and pull the SolutionR dataset using ODS OUTPUT.

Somehow, I think I missed where you are going with this answer as well.

Steve Denham

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