Bookmark and Share

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


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

Re: Re: st: treatreg: extract and store treatment coefficient


From   "Oberdabernig, Doris Anita" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: Re: st: treatreg: extract and store treatment coefficient
Date   Sun, 20 Mar 2011 12:50:00 +0100

>--- On Tue, 15/3/11, Oberdabernig, Doris Anita wrote:
>> I was wondering if there exists any possibility to store
>> the treatment coefficient (and standard error) after a
>> maximum likelihood treatreg estimation.
>> 
>> I estimate several treatreg estimations - with different
>> numbers of explanatory variables (also in the treatment
>> effects equation). The position of the treatment coefficient
>> in e(b) is changing as a result and I cannot access it
>> directly.
>
>Whenever possible you should avoid refering to coefficients
>by their column number; it is just too easy to introduce a
>bug that way. The prefered way to refer to coefficients is 
>by their name, like:
>
>*--------------- begin example -----------
>webuse labor
>generate wc = 0
>replace wc = 1 if we > 12
>treatreg ww wa cit, treat(wc=wmed wfed)
>di _b[wc]
>di _se[wc]
>*---------------- end example -------------
>(For more on examples I sent to the Statalist see: 
>http://www.maartenbuis.nl/example_faq )
>
>This also solves your problem.
>
>Hope this helps,
>Maarten
>
>--------------------------
>Maarten L. Buis
>Institut fuer Soziologie
>Universitaet Tuebingen
>Wilhelmstrasse 36
>72074 Tuebingen
>Germany
>
>http://www.maartenbuis.nl
>--------------------------

Hi Maarten,
thanks a lot for the suggestion. It works perfectly.

Cheers,
Doris
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index