Announcement

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

  • Viewing fixed effect names after estimation; using label in -esttab-

    Hello,


    I'm running the following code:

    label variable outcome ''O"
    label variable treatment "T"
    label variable cohort "C"
    label variable group "G"

    reg outcome i.treatment##i.cohort##i.group i.race i.ed income
    estimates save reg1

    Afterwards, I want to make a table of regression results. So I use:

    estimates use reg1
    eststo reg1
    esttab reg1 using reg1.doc, se r2 label varlabels(_cons Constant) indicate(Controls = *.race *.ed income ) nobaselevels replace


    My first question: the above code gives me an error: *.race not found, or *.edu not found. I assume this means Stata is storing the fixed effects in the regression using different names.
    How do I access the names that Stata is using (and would recognize in -esttab-)?

    My second question: the "label" in the -esttab- is not using all the labels that I assigned. Why is this happening?


    Thank you.

    Best regards,
    Amrita Sanyal.

  • #2
    Do you have the latest version of estout?

    Code:
    ssc install estout, replace

    I do not see why the error occurs. Eventually, if the update does not fix it, provide a data example using dataex that replicates the issue (see FAQ Advice #12 for details).


    My second question: the "label" in the -esttab- is not using all the labels that I assigned. Why is this happening?
    You do not show any actual Stata output. If the labels are too long, they are stored in a macro `e(labels)', so you need:

    Code:
    varlabels(`e(labels)')
    Last edited by Andrew Musau; 12 Apr 2022, 12:41.

    Comment


    • #3
      I would try running esttab with no options (especially not "label"), and seeing what your unlabeled regressors look like.

      Code:
      esttab reg1, varwidth(32)
      It may be that *.race and *.edu are absent, perhaps because of collinearity.

      Comment

      Working...
      X