Hello!
I'm having some trouble getting esttab (from the estout package available on SSC) to display multiple custom text rows based on locals added with estadd local.
I add two locals, weights and controls, to a stored estimation. However, when I try to display them using the scalars() option in esttab, only some appears in the final table.
Here is a minimal working example using the auto dataset:
This code produces a table that includes the row for 'Weights' but omits the one for 'Controls'. My goal is to have both 'Weights' and 'Controls' appear at the bottom of the table, similar to how 'N' is displayed.
In this second example, only the local for Worker FE appears:
Could anyone point out what I am doing wrong here?
I have used this approach multiple times, but for some reason, some times the added local appears in the tables as intended and sometimes it doesn't, and I have no idea why.
Thank you very much in advance!
Hélder
I'm having some trouble getting esttab (from the estout package available on SSC) to display multiple custom text rows based on locals added with estadd local.
I add two locals, weights and controls, to a stored estimation. However, when I try to display them using the scalars() option in esttab, only some appears in the final table.
Here is a minimal working example using the auto dataset:
Code:
clear
sysuse auto
est clear
eststo: reg price weight mpg
estadd local weights "No"
estadd local controls "Yes"
esttab , ///
b(%6.4f) se(%6.4f) star(* 0.1 ** 0.05 *** 0.01) sfmt(%6.2f) numbers ///
scalars("weights Weights" "controls Controls" "N") nonotes
This code produces a table that includes the row for 'Weights' but omits the one for 'Controls'. My goal is to have both 'Weights' and 'Controls' appear at the bottom of the table, similar to how 'N' is displayed.
In this second example, only the local for Worker FE appears:
Code:
est clear
eststo: reg price weight mpg
estadd local WorkerFE "Yes"
estadd local FirmFE "Yes"
estadd local Controls "Yes"
esttab *, ///
b(%6.4f) se(%6.4f) star(* 0.1 ** 0.05 *** 0.01) sfmt(%6.2f) numbers nomtitle ///
scalars("Controls Controls" "WorkerFE Worker FE" "FirmFE Firm FE" "N" "r2 R squared")
Could anyone point out what I am doing wrong here?
I have used this approach multiple times, but for some reason, some times the added local appears in the tables as intended and sometimes it doesn't, and I have no idea why.
Thank you very much in advance!
Hélder

Comment