Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • esttab 2

    Hello there,

    I created regression output using esttab but I also want to include the results for a test I run for each model. How can I make sure that the output table includes the results to those tests for each model? Ideally, I would like the results to display in the say way the results are displayed for the other regressors. Below is the code I used. The code for the test I run for each model looks something like this (as also shown below): test just_activated_cutoff - just_before_cutoff = coethnic_treatment_cutoff - coethnic_control_cutoff. What can I do to have the results of those tests included in the final regression output created with the esttab command?



    est clear
    foreach v in place_name_1 {
    eststo reg1: qui reg incumbent_supporter just_before_cutoff coethnic_control_cutoff just_activated_cutoff coethnic_treatment_cutoff , cluster(`v')
    test just_activated_cutoff - just_before_cutoff = coethnic_treatment_cutoff - coethnic_control_cutoff
    eststo reg2: qui reg incumbent_supporter just_before_cutoff coethnic_control_cutoff just_activated_cutoff coethnic_treatment_cutoff $controls , cluster(`v')
    test just_activated_cutoff - just_before_cutoff = coethnic_treatment_cutoff - coethnic_control_cutoff
    eststo reg3: qui reg incumbent_supporter just_before_cutoff coethnic_control_cutoff just_activated_cutoff coethnic_treatment_cutoff i.country_code , cluster(`v')
    test just_activated_cutoff - just_before_cutoff = coethnic_treatment_cutoff - coethnic_control_cutoff
    }

    esttab reg* using "table_3.tex", replace noobs not lines nocons se nonumber star(* 0.10 ** 0.05 *** 0.01) mtitles("{\b (1)}" "{\b (2)}" "{\b (3)}" "{\b (4)}" "{\b (5)}" "{\b (6)}") stats( N r2,fmt(0 4) label(`"Observations"'`"R-Squared"')) addnote("This is for some notes") title(Proximity to CDD increases incumbent support\label{tab1}) indicate("Year FEs= *.year" "Country FEs= *.country_code", label("\Checkmark" ""))
    Last edited by Jon Grob; 10 Jun 2024, 19:07.

  • #2
    esttab comes with a helper command, estadd. Read -help estadd-. You will be using -estadd scalar- specifically. Post a follow up question if you’re having trouble getting it to work.

    Comment


    • #3
      Thank you. Straightforward and obvious solution, yet overlooked by me. That should do the trick.

      Comment

      Working...
      X