Announcement

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

  • Estout: Reference categories with different labels

    Hi,
    This is about estout. How can I add different reference categories to the regression table that have different labels?
    I want to have some reference categories with no labels (they are subtitles, for example "Interaction effects") and some with the label "ref.", because they are my real reference categories.
    If I'm not in error, I can only have one label for the reference categories if I use the option refcat().
    Thanks in advance for any advice!
    Last edited by Heidi Kuehnemann; 01 Dec 2016, 03:52.

  • #2
    One approach is to use the order option and add a name there that isn't a variable. In the example below, I add "int" and then provide it a label. You could also get the same result by just adding "Interaction" to the order option.

    Code:
    sysuse auto, clear
    
    egen mpg3 = cut(mpg), group(3)
    
    eststo m1: reg price ib0.mpg3##c.trunk weight length
    
    estout m1, varwidth(25) ///
        drop(0.mpg3 0.mpg3#c.trunk ) ///
        order(1.mpg3 2.mpg3 trunk weight length int) ///
        varlabels(int "Interaction") ///
        refcat(1.mpg3 "0.mpg3" 1.mpg3#c.trunk "0.mpg3#c.trunk")

    Comment


    • #3
      Thanks a lot! That works. This solution only has the disadvantage that I need to list a lot of variables/values (in my case most of them) once again in the order option.

      Comment

      Working...
      X