Programming the statistical procedures from SAS

Glimmix estimate statement specification

Reply
New Contributor
Posts: 2

Glimmix estimate statement specification

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.

Respected Advisor
Posts: 2,655

Re: Glimmix estimate statement specification

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

New Contributor
Posts: 2

Re: Glimmix estimate statement specification

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.

Respected Advisor
Posts: 2,655

Re: Glimmix estimate statement specification

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

Ask a Question
Discussion stats
  • 3 replies
  • 182 views
  • 0 likes
  • 2 in conversation