Dear Statalisters,
I am trying to automate the process of creating a descriptive statistics table by using 'esttab' in Stata 14.0. Data is longitudinal and consists of 12 waves. All goes well in principle, but I would like to report the percentages as a number between 0-100%, not as a number between 0-1. I have tried using the option 'transform' for 'esttab' but I can't seem to figure it out.
For instance; the variables HHHP, HHHF and HHHR are dummy variables. So taking the mean results in a number between 0-1. I would like to 'multiply this number by a 100' to get the percentage of observations that are equal to 1.
I would really appreciate any help on this topic, thank you very much in advance!
Greetings,
Rinze
I am trying to automate the process of creating a descriptive statistics table by using 'esttab' in Stata 14.0. Data is longitudinal and consists of 12 waves. All goes well in principle, but I would like to report the percentages as a number between 0-100%, not as a number between 0-1. I have tried using the option 'transform' for 'esttab' but I can't seem to figure it out.
For instance; the variables HHHP, HHHF and HHHR are dummy variables. So taking the mean results in a number between 0-1. I would like to 'multiply this number by a 100' to get the percentage of observations that are equal to 1.
Code:
quietly eststo A: estpost sum HHHP HHHF HHHR quietly eststo B: estpost sum HHHP HHHF HHHR if year == 1 quietly eststo C: estpost sum HHHP HHHF HHHR if year == 12 #delimit; esttab A B C, replace mtitle("All waves" "Wave 1" "Wave 12") cells(mean(fmt(2))) label nonum f collabels(none) noobs transform(100*@ @) ; #delimit cr
Greetings,
Rinze
Comment