Announcement

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

  • indicate() for multiple groups of control variables

    Dear all,

    I use indicate() in the esttab options to suppress from the full output the coefficients of a group of control variables and to just indicate whether the models includes those controls or not (so, I use: indicate($controlgroup1).

    But what if I have 2 groups of controls that I do not include immediately all at the same time? Is there a way to adapt indicate()?

    Thank you for your help,

    Andrea

  • #2
    Ok, problem solved. Just for those who are still wondering, you should have something like that

    local controlgroup1
    local controlgroup2

    eststo clear
    eststo: qui reg
    estadd local controlgroup1 "No"
    estadd local controlgroup2 "No"
    eststo: qui reg
    estadd local controlgroup1 "Yes"
    estadd local controlgroup2 "No"
    eststo: qui reg
    estadd local controlgroup1 "Yes"
    estadd local controlgroup2 "Yes"

    set more off
    #delimit;
    esttab using "",
    keep(...) star(* 0.10 ** 0.05 *** 0.01) b(3)
    stats(controlgroup1 controlgroup2, labels(`"control 1"' `"control 2"' ));
    #delimit cr

    Comment


    • #3
      I had trouble implementing Andrea's solution because the second estadd command was not recognized. Continuing Andrea's example, my solution was:

      estadd local controlgroup1 "No" : est1
      estadd local controlgroup1 "Yes" : est2 est3
      estadd local controlgroup2 "No" : est1 est2
      estadd local controlgroup2 "Yes" : est3

      Comment


      • #4
        A simple example on how to use indicate for more than one group of control variables. Avoids the use of estadd.
        Code:
        use http://www.stata-press.com/data/r8/nlsw88.dta, clear
        eststo reg1: reg wage occupation union tenure hours age race married collgrad grade
        esttab reg1, indicate("Demographic control = age race married" "Education = collgrad grade")
        Cheers,
        Felix
        Stata Version: MP 18.0
        OS: Windows 11

        Comment

        Working...
        X