Hi everyone,
I am trying to export a descriptive statistics table using estpost tabstat and esttab but I keep getting numeric values when using the by(group) option even though the variable group is a string. I am using this code:
eststo av: estpost tabstat A B C D E F G, ///
statistics(mean median sd max min n) by(region) columns(statistics)
esttab av using "${path}/statistics.tex", label noobs booktabs nonumber nodepvars nomtitles ///
cells("Mean(pattern(1 1 0) fmt(2)) p50(fmt(0)) SD(pattern(1 1 0)) Min(fmt(0)) Max(fmt(0)) count(fmt(0))") ///
collabels("Mean" "Median" "Std. Dev." "Min." "Max." "N") replace
And I get:
Region | e(Mean) e(p50) e(SD) e(Max) e(Min) e(count)
-------------+------------------------------------------------------------------
1 |
A | 3.5 3 .9718253 5 2 10
B | .6 1 .5163978 1 0 10
C | .8 1 .421637 1 0 10
D | .1 0 .3162278 1 0 10
E | 0 0 0 0 0 10
F | 0 0 0 0 0 10
G | 0 0 0 0 0 10
-------------+------------------------------------------------------------------
2 |
A | 2.833333 3 .3892495 3 2 12
B | .9166667 1 .2886751 1 0 12
C | 1 1 0 1 1 12
.
.
.
I want in the table the values of the region variable (Europe, Asia, Africa, America...) instead of numbers (1, 2, 3, 4...).
Many thanks,
Tessa
Related Posts with Labels in by group variable using estpost tabstat
F test for cof.Hello everyone, My model is: Y = b0 + b1.x1 + b2.x2 + b3.x3 + e and I use GMM for this model. I wa…
Panel data with three identifiersDear All, I am currently working with a country-year panel dataset which has data for value added f…
how to export Summary Statistics to wordDear Sir/Madam I am working on my thesis on impact of informal credit on household welfare. I try to…
Matching observations across boundariesI am looking at houses on each side of a designated geographical boundary. Does anyone know how to …
Adding partner data to responding person data in a panel data fileI wish to extend my analysis of panel data to include information about the responding person's part…
Subscribe to:
Post Comments (Atom)
0 Response to Labels in by group variable using estpost tabstat
Post a Comment