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
Urgent Help NeededDear Forum, I am currently working on my Bachelor's Thesis, and my data results are not really maki…
Quantile Regression : LogicHi, I am working on a dataset where I am required to run quantile regressions. I want to understand …
Tagging different values of encrypted variableI am dealing with a dataset with monthly information on the different hospitals each health professi…
-estout- returning "file could not be opened" error except for tex filesI'm running into a puzzling situation where I'm receiving the "file [XYZ] could not be opened" error…
Help on Interpreting Negative Value Index dependent variableI am doing a linear regression with an index (values from -400 to 400) as my continuous dependent va…
Subscribe to:
Post Comments (Atom)
0 Response to Labels in by group variable using estpost tabstat
Post a Comment