Dear Stata users,
I am conducting t-tests on several variables in my sample. Due to missing values, the number of observations per test differs. Is there any way via the esttab command to display, for each test, either (A) the number of of observations by group directly under the mean (the red part in my picture below) or (B) total observations in a separate column (the blue part in my picture)? Either way would be great.
Thanks for you help.
My code is as follows:
I am conducting t-tests on several variables in my sample. Due to missing values, the number of observations per test differs. Is there any way via the esttab command to display, for each test, either (A) the number of of observations by group directly under the mean (the red part in my picture below) or (B) total observations in a separate column (the blue part in my picture)? Either way would be great.
Thanks for you help.
My code is as follows:
Code:
global balance_desc firm_age exporter size_num Retail Manuf Services foreign_perc
recode treatment (1=0) (0=1)
eststo balance: estpost ttest $balance_desc , by(treatment)
esttab balance using "$path\temp\balance_FO_control.csv", plain cells("mu_1(label(Treated Firms $<$ 15 km) fmt(2)) mu_2(label(Control (Future SEZ))) b(label(Treatment-Control) star pvalue(p))" ". . p(label(p-value) par)") replace label star(* 0.10 ** 0.05 *** 0.01) title(Balance of Observables)

Comment