- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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?
@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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I think so. lsmeans ./ ilink exp diff cl ; Did you try OUTPUT statement ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.