Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# st: Margin with two step estimator.

 From "Nakelse, Tebila (AfricaRice)" To "statalist@hsphsun2.harvard.edu" Subject st: Margin with two step estimator. Date Thu, 2 Feb 2012 08:18:59 +0000

Dear Stata Users,
I've estimated a two-step equations. The first step is a logit and the second one is  E(Y| p,X)= a + bp + cx +... where p  is the predicted probability of the first step.
I want to use the margin command to  have the predicted value of E(Y| p,X). But my problem is to tell to margin that I want him to predict p and after to predict E(Y| p,X) simultaneously.
What I have tried to do   is to stack the b and V matrix of the two steps and give it to margins as his b and V matrix and write  the full equation to be calculated by margin using the b elements as coefficients.
But the main problem is to access the coefficients of the b or the V matrix of stata.

Please is someone can help me ?

Tebila

*
*   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/