Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Conditional marginal effects in heckprob


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Conditional marginal effects in heckprob
Date   Mon, 23 Aug 2010 14:44:40 +0000 (GMT)

--- On Mon, 23/8/10, Garrido, Melissa wrote:
> I have a question about the -margins- command in Stata 11,
> when used after heckprob.
> 
> 
> I want to get conditional marginal effects of my outcome
> variable, but I'm not sure whether I have the correct
> syntax (and haven't found the answer in the help files).
> 
> Is the default option within -margins- to calculate the
> conditional marginal effect, or is there something
> additional I need to specify?
> 
> Here is what I have:
> 
> ****
> 
> heckprob diedvsroutinetotal = $indepvar , select
> (not_transfer = $indepvar $instruments) 
> 
> /*Marginal effects at means:*/
> 
> margins, dydx(*) atmeans 
> 
> 
> /*Average marginal effect:*/
> 
> margins, dydx(*)

I assume that with conditional marginal effects you
mean the marginal effect on the predicted probability 
of success conditional on selection. In that case 
you need to add the -predict(pcond)- option. Right 
now, you are estimating the marginal effect on 
probability of success. 

The -predict()- option in -margins- determines what
your response/dependent/explained/y variable is, and
if you do not specify it, it will assume that it is
the default for -predict-. If you look at
-help heckprob postestimation-, you will see that the
default is -pmargin-, which is described as 

"the default, calculates the univariate (marginal) 
predicted probability of success; Pr(depvar=1)" 

You probably want: 

"pcond calculates the conditional (on selection) 
predicted probability of success; Pr(depvar=1 | 
depvar_s=1) = Pr(depvar=1, depvar_s=1)/Pr(depvar_s=1)."
 
Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index