BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
FabianChamba
Calcite | Level 5

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?

 

1 ACCEPTED SOLUTION

Accepted Solutions
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

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

5 REPLIES 5
Reeza
Super User

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?

 


 

Ksharp
Super User
I think so.
lsmeans ./ ilink exp diff cl ;

Did you try OUTPUT statement ?

sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

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.

 

FabianChamba
Calcite | Level 5

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!

sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 5 replies
  • 3126 views
  • 0 likes
  • 4 in conversation