turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Does lsmean with ilink in proc glimmix produce sta...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-21-2017 11:24 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to FabianChamba

04-22-2017 10:37 PM

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.

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to FabianChamba

04-22-2017 12:05 AM - edited 04-22-2017 12:05 AM

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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to FabianChamba

04-22-2017 06:13 AM

I think so. lsmeans ./ ilink exp diff cl ; Did you try OUTPUT statement ?

Solution

04-28-2017
12:06 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to FabianChamba

04-22-2017 10:37 PM

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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-27-2017 11:49 AM

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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to FabianChamba

04-28-2017 01:47 AM

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.