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 on April 23, and its replacement, statalist.org is already up and running.


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

st: encountering problem with esttab while attempting to get summary statistics into latex


From   Ridhima Gupta <g.ridhima@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: encountering problem with esttab while attempting to get summary statistics into latex
Date   Tue, 21 Jun 2011 09:14:18 +0100

Hello,

I want to compare characteristics of plots on which a certain
technology (Happy Seeder in my case) was used with all other plots in
my sample. I want to then take these summary statistics to latex.

To do this, I run the following commands in stata.

bysort Happy_Seeder: gen total = _N
label var total "Observations"

estpost tabstat  yield_per_hec cost_per_hec revenue plotsize_hec age
education Watch Contact_with_Extension Rmag total, by(Happy_Seeder)
listwise s(mean sd) columns(statistics)

On running this I get a table in Stata displaying the summary statistics.

I next run the command

esttab using happyseeder_vs_others.tex,main(mean) aux(sd) nostar
nodepvar unstack nomtitle nonumber noobs addnotes("Note: Includes all
Happy Seeder users and all other users."  "Mean of each variable with
standard deviation in parentheses.") label title("Summary of plots
sown with Happy Seeder and other plots \label{Happy Seeder}") replace
nonotes

I now get a error saying that "current estimation results do not have
e(b) and e(V)".

When I type ereturn list, I obtain the following,



scalars:
                  e(N) =  159

macros:
                e(cmd) : "estpost"
             e(subcmd) : "tabstat"
              e(stats) : "mean sd"
               e(vars) : "yield_per_hec cost_per_hec revenue
plotsize_hec age education Watch Contact_with_Extension Rmag total"
              e(byvar) : "Happy_Seeder"

matrices:
               e(mean) :  1 x 30
                 e(sd) :  1 x 30

So I think the means and the standard deviations have been stored but
I am not getting the output in tex. How can I get the output in the
tex format?


Thanks in advance for your help,

Best Wishes,
Ridhima
*
*   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