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]

st: Margin with two step estimator.


From   "Nakelse, Tebila (AfricaRice)" <T.Nakelse@cgiar.org>
To   "statalist@hsphsun2.harvard.edu" <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/


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