Hello everyone,
I need to generate a comprehensive descriptive statistics table based on a panel table as the picture shows(please see the end of the post, thanks):
An extract of the variables are like the follows:
I have code like this:
Now I can't figure out how to add another statistic, namely the median for each variable.
Could anyone help me out with this one?
Thanks a lot in advance.
Sample descriptive statistics:
I need to generate a comprehensive descriptive statistics table based on a panel table as the picture shows(please see the end of the post, thanks):
An extract of the variables are like the follows:
Code:
input long audit_fee float ln_AF double total_assets float ln_TA long net_income float(ln_NI busy chTA big_4) 1 0 7217 8.884194 2058 7.62949 1 2096 0 2 .6931472 5121 8.541105 479 6.1717 1 . 0 18 2.890372 4040 8.304 -411 . 1 . 0 20 2.995732 10100 9.220291 4352 8.37839 1 . 0 21 3.0445225 16694 9.722805 8022 8.9899435 1 6594 0 24 3.178054 217040 12.287837 -8403 . 1 . 1 25 3.218876 1907 7.553287 -20 . 1 . 0
Code:
ssc install estout eststo summstats: estpost summarize audit_fee ln_AF total_asset ln_TA net_income ln_NI busy chTA big_4 eststo big_4: estpost summarize audit_fee ln_AF total_asset ln_TA net_income ln_NI busy chTA if big_4==1 eststo non_big_4: estpost summarize audit_fee ln_AF total_asset ln_TA net_income ln_NI busy chTA if big_4==0 esttab summstats big_4 non_big_4 using descriptive statistics.rtf, replace main(mean %6.2f) aux(sd) mtitle("Total sample" "Big Four clients" "Non-Big Four clients") esttab summstats big_4 non_big_4 using descriptive statistics.rtf, replace cell("mean sd") mtitle("Total sample" "Big Four clients" "Non-Big Four clients")
Could anyone help me out with this one?
Thanks a lot in advance.
Sample descriptive statistics:
Comment