Announcement

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

  • Estout's refcat option with lead variables

    Dear members of this forum,

    I’m using Stata 13.1 / SE on Windows 10, where I am encountering the following problem:

    I'm using the estout command to export my regression tables to tex format. Furthermore, i'm using the refcat option to create an additional line with descriptions above some certain variables / groups of variables in the tables. It is pretty easy since one just need to add the variable name and the label as an argument of the refact option. However, unfornately this does not seem to work if I use a lead or lagged value of a variable indicated by the prefix "f." respecetively "l.".

    My code looks like the following example.
    Code:
    reg y var1 var2 f.var3
    est store est1
    
    esttab est1 using test.tex, replace refcat(var1 "Name of var1" var2 "Name of var2" f.var3 "Lead value of var3")
    Running this code in Stata just delivers additional lines with "Name of var1 and "Name of var2" in the tex file but not with "Lead value of var3". In additon, using var3 instead of f.var3 as an refcat argument does not work. I also tried to use a wildcard argument like *var3, but this is also not possible.

    I have googled this problem and also looked in the help file, but unfortunately I couldn' find a solution.

    Does anybody know a suitable solution?


    Thanks in advance!

    Best regards
    Andreas Denzer

  • #2
    Sometimes solutions can be so easy

    Just taking the capital F as lead indicator, i.e.
    Code:
    reg y var1 var2 F.var3
    est store est1
    
     esttab est1 using test.tex, replace refcat(var1 "Name of var1" var2 "Name of var2" F.var3 "Lead value of var3")
    and it works!

    Comment

    Working...
    X