Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Maarten buis <maartenbuis@yahoo.co.uk> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: treatreg: extract and store treatment coefficient |
Date | Tue, 15 Mar 2011 15:01:53 +0000 (GMT) |
--- 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 -------------------------- * * 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/