Turn on suggestions

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

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- How to calculate standard errors of marginal effects

Options

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 09-23-2015 07:50 PM
(3572 views)

I am running a probit regression and want to report marginal effects and the standard errors of the marginal effects. Here is my code for the regression and marginal effects:

proc qlim data=sa.Ipumsi_sa_reg;

model CHDIED=SADC ROA AGE / DISCRETE(d=probit);

where OSEAS=0 and 20 le AGE le 35;

weight WTPER;

output out=outme marginal;

run;

quit;

proc means data=outme n mean;

var Meff_P2_SADC Meff_P2_ROA Meff_P2_AGE;

title 'Average of the Individual Marginal Effects';

run;

quit;

How can I calculate the standard errors of the marginal effects?

Thank you.

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

You can get the estimated marginal effects and their standard errors by fitting the model in PROC NLMIXED and using the PREDICT statement as shown in this note on marginal effects. For example, these statements use QLIM and NLMIXED to fit the same probit model to the cancer remission data shown in the first example in the LOGISTIC documentation. The OUTNL output data set from PROC NLMIXED contains the estimated marginal effects (Pred) and the standard errors (StdErrPred).

proc qlim data=remiss;

model remiss=blast smear / discrete;

output out=outqlim marginal;

run;

proc nlmixed data=remiss;

lp=int+bblast*blast+bsmear*smear;

p=probnorm(lp);

model remiss ~ binary(p);

predict pdf('NORMAL',lp)*bblast out=outnl;

run;

- Tags:
- marginal effects

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

This example seems to give SE and CI for each value at which a ME is calculated. If we are interested in average marginal effects, other examples use PROC MEANS in combination with PROC QLIM to average all of the MEs to get the desired result. (https://support.sas.com/rnd/app/ets/examples/margeff/index.html) Would we get the correct standard errors and confidence intervals simiply using proc means as such:

**PROC** **MEANS** DATA=OUTNL MEAN STDERR CLM;

VAR PRED;

**RUN**;

Or is there another way to leverage NLMIXED in a such a way to produce average marginal effects and their standard errors? I'm thinking to get standard errors for marginal effects calculated this way some sort of loop/bootstrap approach might be necessary?

I know this is an old discussion but looking for a solution today and I ran across this string.

Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Tags:
- marginal effects

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

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.