Programming the statistical procedures from SAS

Does lsmean with ilink in proc glimmix produce standardized probabilities including random effects?

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Does lsmean with ilink in proc glimmix produce standardized probabilities including random effects?

Dear All,

 

I am new to SAS and I am trying to get standardized probabilities from this mixed effect logistic regression model in proc glimmix:

 

proc glimmix data=first plots=all pconv=1e-6 or;
nloptions maxiter=200000;
class farmID numemply_rank(ref="1") ;
model pos (event='1')=numemply_rank sampling numemply_rank*sampling/s link=logit dist=binomial stdcoef;
random intercept sampling /subject=farmID type=un;
lsmeans numemply_rank/or ilink plots=all;
run;

 

I need the standardized probabilities that take into account random effects in order to be able to calculate relative risk and risk difference.

 

Can you help me with this question?

 


Accepted Solutions
Solution
‎04-28-2017 12:06 PM
PROC Star
PROC Star
Posts: 186

Re: Does lsmean with ilink in proc glimmix produce standardized probabilities including random effec

I'm not sure what you mean by "standardized probabilities" either.

 

If what you want is BLUPs, check the documentation for the OUTPUT statement using the ILINK and NOBLUP keywords for PRED.

 

View solution in original post


All Replies
Super User
Posts: 18,569

Re: Does lsmean with ilink in proc glimmix produce standardized probabilities including random effec

[ Edited ]

I've moved your question to the Statistical Procedures forum.

 

I'm not familiar with PROC GLIMMIX or the term standardized predictions, but have you looked at the OUTPUT statement in GLIMMIX to see if it can produce the desired results?

 

http://documentation.sas.com/?docsetId=statug&docsetVersion=14.2&docsetTarget=statug_glimmix_syntax1...

 


FabianChamba wrote:

Dear All,

 

I am new to SAS and I am trying to get standardized probabilities from this mixed effect logistic regression model in proc glimmix:

 

proc glimmix data=first plots=all pconv=1e-6 or;
nloptions maxiter=200000;
class farmID numemply_rank(ref="1") ;
model pos (event='1')=numemply_rank sampling numemply_rank*sampling/s link=logit dist=binomial stdcoef;
random intercept sampling /subject=farmID type=un;
lsmeans numemply_rank/or ilink plots=all;
run;

 

I need the standardized probabilities that take into account random effects in order to be able to calculate relative risk and risk difference.

 

Can you help me with this question?

 


 

Super User
Posts: 9,775

Re: Does lsmean with ilink in proc glimmix produce standardized probabilities including random effec

I think so.
lsmeans ./ ilink exp diff cl ;

Did you try OUTPUT statement ?

Solution
‎04-28-2017 12:06 PM
PROC Star
PROC Star
Posts: 186

Re: Does lsmean with ilink in proc glimmix produce standardized probabilities including random effec

I'm not sure what you mean by "standardized probabilities" either.

 

If what you want is BLUPs, check the documentation for the OUTPUT statement using the ILINK and NOBLUP keywords for PRED.

 

New Contributor
Posts: 2

Re: Does lsmean with ilink in proc glimmix produce standardized probabilities including random effec

Yes, I want the blups but just the marginal effects, meaning the average for the levels of the categorical predictor. Or can I just obtain the blups means for the lsmeans ilink statement? Or I have to obtain the mean from the generated blups?

 

Is the blups similar to the probabilitiies generated with the margins command in stata?

 

Thanks!

PROC Star
PROC Star
Posts: 186

Re: Does lsmean with ilink in proc glimmix produce standardized probabilities including random effec

The OUTPUT statement produces predictions (BLUP or BLUE) for individual observations. If you want means over a fixed effects factor, then you may be able to use ESTIMATE or CONTRAST statements with narrow (as opposed to broad or intermediate) inference. See Chapter 6 in https://www.sas.com/store/books/categories/usage-and-reference/sas-for-mixed-models-second-edition/p... for more information and additional references.

 

I don't use Stata so I cannot answer that question.

☑ This topic is solved.

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

Discussion stats
  • 5 replies
  • 189 views
  • 0 likes
  • 4 in conversation