Hello all. I am trying to add additional statistics to a latex table using the user-written command esttab. In the code that follows, the diffse stat shows up as blank in the results table and I am unsure why. I've also tried with the "scalar" option with no luck. Note that the macro `se' is not blank.
The diffb stat, with stars, and its label show up fine. It also makes no difference whether I add a label for diffse.
Code:
eststo m1:reg complete1 trainee_tt trainee_dl i.ind_bin , vce(cluster CoopSN) lincom trainee_tt-trainee_dl local diff: display %8.3f r(estimate) local se: display %8.3f r(se) if r(p) < 0.10 { local diff = "`diff'*" } if r(p) < 0.05 { local diff = "`diff'**" } if r(p) < 0.01 { local diff = "`diff'***" } estadd local diffb `diff' estadd local diffse `se' esttab using "$d9/Tables/tex/cahw/complete_dlvstt.tex", /// prehead(" \begin{tabular}{l*{1}{c}}\toprule \noalign{\smallskip}") /// fragment b(%8.3f) se(%8.3f) stats(diffb diffse, layout(@ (@)) labels("Difference" "")) noobs compress nonumb star(* 0.10 ** 0.05 *** 0.01) keep(trainee_tt trainee_dl) /// coefl(trainee_tt "ITT, traditional" trainee_dl "ITT, distance") replace /// mtitle("\shortstack{Completed training}")
Comment