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
- /
- Replicate the margins command from STATA

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

05-01-2017 01:21 PM

I am still new in SAS and trying to modelize my first probit model. I am using the following sequence of command in order to obtain my probit estimate:

**proc** **logistic** data=pop_final;

class SEX (REF="M") AGEGR (REF="3") NON_EE (REF="0")/PARAM=REF;

model SCIENCE = SEX AGEGR NON_EE / link=probit technique=newton;

ods output parameterestimates=prbparms;

output out=outprb prob=p xbeta=xbpr;

**run**;

However, I would now like to replicate the margins command in STATA (http://www.stata.com/manuals13/rmargins.pdf). It allowed me to estimate margins of responses for specified values of covariates of a previously fit model. For example, following my probit model that estimated, in particular, the effect of changing industry of employment following a layoff, I was able to use the margin command to estimate the probability of a workers being laid-off from a specific industry to change industry in his following job.

Would someone know a command in SAS that could replicate what I was able to do with STATA?

Thank you in advance

Accepted Solutions

Solution

05-12-2017
08:05 AM

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

Posted in reply to Shawn08

05-11-2017 02:57 PM

All Replies

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

Posted in reply to Shawn08

05-09-2017 11:40 AM

I think you might be looking for the, "__LS-Means__" option??

Also, here is this Proc GENMOD Logistic Regression . GENMOD will let you use the LS-Means statement.

Alternatively, Proc GLIMMIX . Even though you may not ever use the random intercepts or slopes. I tend to go with Glimmix, because the "* NLOPTIONS*" statement lets you be fairly flexable if the model has a difficult time converging.

I think each one of those procedures has information on the LS-means functionality.

Good luck!

Solution

05-12-2017
08:05 AM

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

Posted in reply to Shawn08

05-11-2017 02:57 PM

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

Posted in reply to StatDave_sas

05-11-2017 03:23 PM

Yeah, I totally misunderstood. What @StatDave_sas said is where you need to be.

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

Posted in reply to StatDave_sas

05-12-2017 08:06 AM

Sorry for the delay in the reply, thank you for your help!