I am trying to use the tabout
command in Stata to produce a table showing summary statistics of the age variable. What I want is something similar to summarize age, detail
output but to produce output similar to MS Word format.
tabout age using table111.txt, c(skewness age kurtosis age mean age median age sd age) f(0c) sum h3(nil) npos(both)
does not produce the results I want.
Any suggestions on how the code should be adjusted? Also what if I want to include a second variable in the table and the summary statistics of same?
You can do something like that with the estout
package. There you would type:
estpost summarize age, detail
esttab . using table111, cells("skewness kurtosis mean p50 sd") noobs rtf
You can read more here: http://repec.org/bocode/e/estout/hlp_estpost.html#summarize
If you want to include a second variable, say hours
, to that table, you just type:
estpost summarize age hours, detail
esttab . using table111, cells("skewness kurtosis mean p50 sd") noobs rtf