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: Estout question


From   Jeff Schiman <jeff.schiman@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Estout question
Date   Wed, 17 Feb 2010 14:13:24 -0500

Greetings,

I want to send regression results to excel in a restructured form that is
condusive with pivot tables (see below). Basically, I want my N and R-square
to appear in their own columns. Any help would be much appreciated.

What I have written thus far:

estout Model1 using example.txt, begin(Logit,Model 1,) ///
cells("b (fmt(3) label(Value)) p(label(P-Value)) ci_l(label(CI Low))
ci_u(label(CI High))") ///
stats(N df_m r2_p) ///
replace
estout Model2 using example.txt, append ///
begin(Logit,Model 2,) ///
cells("b(fmt(3) label(Value)) p(label(P-Value)) ci_l(label(CI Low))
ci_u(label(CI High))") ///
stats(N df_m)

This produces:

Logit Model 1 Value P-Value CI Low CI High
Logit Model 1  x1 1.236 0.003 0.435 2.038
Logit Model 1  x2 0.264 0.187 -0.128 0.656
Logit Model 1  x3 1.994 0.000 1.566 2.422
Logit Model 1  x4 0.192 0.431 -0.286 0.671
Logit Model 1  N 1172
Logit Model 1  df_m  32
Logit Model 1   r2_p    0.261
Logit Model 2 Model2
Logit Model 2 Value P-Value CI Low CI High
Logit Model 2  x1 2.597 0.004 0.844 4.35
Logit Model 2  x2 1.578 0.026 0.190 2.965
Logit Model 2  x3 2.136 0.003 0.724 3.548
Logit Model 2  x4 0.075 0.911 -1.228 1.378
Logit Model 2  N 1172
Logit Model 2  df_m   32
Logit Model 2    r2_p     0.203


What I want (all separate columns):

Type Model  Variable Value P-Value CI Low CI High N df_m  r2_p
Logit Model 1 x1 1.236 0.003 0.435 2.038 1172   32 0.261
Logit Model 1 x2 0.264 0.187 -0.128 0.656 1172   32 0.261
Logit Model 1 x3 1.994 0.000 1.566 2.422 1172   32 0.261
Logit Model 1 x4 0.192 0.431 -0.286 0.671 1172   32 0.261
Logit Model 2 x1 2.597 0.004 0.844 4.350 1172   32 0.203
Logit Model 2 x2 1.578 0.026 0.190 2.965 1172   32 0.203
Logit Model 2 x3 2.136 0.003 0.724 3.548 1172   32 0.203
Logit Model 2 x4 0.075 0.911 -1.228 1.378 1172   32 0.203


Thank you,

Jeff Schiman

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