Hi Statalisters,
I am trying to create a table of means of three variables (char1, char2, char3), with a single column of observation count on the left, very much similar to below, but without empty columns. How can I achieve that?
char1 in the first estpost is chosen arbitrarily, I'd just like to count the number of observations per year, so it can be any of the other chars.
Many thanks in advance.
Maiia
I am trying to create a table of means of three variables (char1, char2, char3), with a single column of observation count on the left, very much similar to below, but without empty columns. How can I achieve that?
char1 in the first estpost is chosen arbitrarily, I'd just like to count the number of observations per year, so it can be any of the other chars.
Code:
. eststo: qui estpost tabstat char1 , statistics(count) by(year) columns(statistics) (est1 stored) . eststo: qui estpost tabstat char1 char2 char3 , statistics(mean) by(year) columns(variables) (est2 stored) . esttab , cells("count char1(fmt(%9.1f)) char2( fmt(%9.2f)) char3( fmt(%9.0f))") noobs nonumber -------------------------------------------------------------------------------------------------------------------- count char1 char2 char3 count char1 char2 char3 -------------------------------------------------------------------------------------------------------------------- 1 192 12.0 0.58 215 2 180 8.9 0.54 278 3 113 10.0 0.54 274 4 96 10.5 0.52 319 5 69 9.3 0.47 303 6 52 5.8 0.49 355 7 29 6.0 0.44 392 8 23 7.9 0.49 356 9 20 4.7 0.49 347 10 9 9.8 0.48 298 11 4 16.3 0.55 408 12 4 11.5 0.46 542 Total 791 9.6 0.53 285 --------------------------------------------------------------------------------------------------------------------
Maiia
Comment