Hi!
I want to export this simple summary statistics to LaTeX. I have exported many tables and regressions results, but somehow I cannot get this one right.
I use
And it looks how I want it, but when I try to export it I use
This is an example of my data
(I only have one exporter)
The mean, sd and count are under each other in rows, instead of a wide format, like it is displayed in Stata.
So what I want is that there are four columns in total, "importer" "mean" "sd" "observations".
I tried adding "wide" etc. but I cant get it to work.
I want to export this simple summary statistics to LaTeX. I have exported many tables and regressions results, but somehow I cannot get this one right.
I use
PHP Code:
eststo: estpost tabstat sum_total, by(importer) stat(mean sd count)
PHP Code:
esttab using sumres.tex, booktabs cells(mean sd count)
PHP Code:
[CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input str32 importer int year float(sum_total gdp_imp lgdp_imp)
"Algeria" 2002 2 56760037376 24.7621
"Algeria" 1989 0 55630036992 24.74199
"Algeria" 1999 0 48639987712 24.60771
"Algeria" 2007 0 134999924736 25.62854
"Algeria" 1991 0 45719977984 24.5458
"Algeria" 1993 0 49950023680 24.63429
"Algeria" 1997 0 48179978240 24.59821
"Algeria" 1998 0 4.819e+10 24.59842
"Algeria" 2011 0 2.000001e+11 26.021584
"Algeria" 1995 0 41759969280 24.455204
"Algeria" 2000 0 54790037504 24.726774
The mean, sd and count are under each other in rows, instead of a wide format, like it is displayed in Stata.
So what I want is that there are four columns in total, "importer" "mean" "sd" "observations".
I tried adding "wide" etc. but I cant get it to work.
Comment