Statalist


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

Re: st: Capturing e(_estimates_name) into an estout statement


From   "Martin Weiss" <[email protected]>
To   [email protected]
Subject   Re: st: Capturing e(_estimates_name) into an estout statement
Date   Thu, 31 Dec 2009 16:00:40 +0100

<>

***
sysuse auto, clear
xi:logistic foreign i.rep78 weight length

eststo test

estout using example6.csv, replace  /// 
cells("b(fmt(3)) ci_l(fmt(3)) ci_u(fmt(3))" )  ///
eform type varlabels(,prefix("`e(_estimates_name)' "))
***


HTH
Martin
-------- Original-Nachricht --------
> Datum: Wed, 30 Dec 2009 17:44:55 -0800
> Von: Rob James <[email protected]>
> An: [email protected]
> Betreff: st: Capturing e(_estimates_name) into an estout statement

> After running a logistic regression model and using eststo to save the 
> results, I see that a macro variable
> (estimates_name) is generated.
> 
> Using estout I'd like to capture that estimates_name to the csv file 
> along with the beta estimates and CIs. Here's an editted screen grab:
> 
> xi: logistic .....
> eststo test
> 
> ereturn list
> ...
> 
> macros:
>     e(_estimates_name) : "test"
>             e(cmdline) : "logistic newdelayed  _Isex_* _Iagegrp2_* 
> _Iracegrp_* _Ifirsttime_*  _Ilocation__*  _Ihour_.."
>                 e(cmd) : "logistic"
>             e(predict) : "logistic_p"
> ...
> 
> 
> With the following command I can capture and output the OR and CI:
> 
> estout  using example6.csv, replace  cells("b(fmt(3)) ci_l(fmt(3)) 
> ci_u(fmt(3))" ) eform type
> 
> which yields:
> 
> _Isex_0 0.324   0.281   0.373
> _Iagegrp2_1     4.013   3.527   4.566
> _Iagegrp2_2     2.843   2.423   3.335
> _Iagegrp2_3     1.817   1.379   2.394
> 
> But I am looking for a syntax for estout which would yield:
> 
> test _Isex_0 0.324   0.281   0.373
> test _Iagegrp2_1     4.013   3.527   4.566
> test _Iagegrp2_2     2.843   2.423   3.335
> test _Iagegrp2_3     1.817   1.379   2.394
> 
> where "test" was the contents of e(_estimates_name).
> 
> Any suggestions?
> 
> Thanks,
> 
> Rob
> 
> 
> 
> 
> 
> *
> *   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/

-- 
Preisknaller: GMX DSL Flatrate für nur 16,99 Euro/mtl.!
http://portal.gmx.net/de/go/dsl02
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index