I am working on generating a simple balance table, which tests equality of variables across a common treatment & then adds the result of a joint significance test below. I am using the esttab package to export to latex. Everything works as intended, except that the stored p-value for the joint-test does not appear. Example code below:
Output:
Code:
clear all
ssc install estout
sysuse auto
eststo diffs: estpost ttest price mpg weight length, by(foreign)
reg foreign price mpg weight length
testparm price mpg weight length
estadd scalar joint_test = `r(p)'
esttab using "balance.tex", replace ///
star(* 0.10 ** 0.05 *** 0.01) label booktabs nonum gaps noobs compress ///
cells("mu_1(fmt(2)) mu_2(fmt(2)) p(fmt(3)) count(fmt(0))") ///
collabels("Control" "Treatment" "p-value" "N") ///
scalars("joint_test Joint significance test") sfmt(3)

Comment