Announcement

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

  • Bug in estout when using same estimate in two columns

    If the same estimate is shown in two separate columns, using the -indicate- option, only one column of indicators is generated.
    Code:
    eststo first: reg y x1
    eststo second:  reg y x1 x2
    estout first second , indicate(vars=x*)
    (correctly) produces
    Code:
     ------------------------------------
                   (1)             (2)            
                    y               y          
     ------------------------------------
    vars            Yes             Yes                    
     ------------------------------------
    N               2967           2967           
     ------------------------------------
    but
    Code:
    estout first second second , indicate(vars=x*)
    produces
    Code:
     ------------------------------------------------------------
                   (1)             (2)             (3)   
                    y               y               y   
     ------------------------------------------------------------
    vars            Yes             Yes                   
     ------------------------------------------------------------
    N               2967           2967         2967
     ------------------------------------------------------------
    With a missing "Yes" in the third column

    (I'm using Stata 15 with and estout *! version 3.21 19aug2016)

    Since I do not know if Ben Jann follows this forum, his GitHub or can be reached through other channels I am also cross-posting this issue here https://github.com/benjann/estout/issues/18

  • #2
    Bit much to call this a bug.
    In what situation would this be required? I can't think of any circumstance, so verging on complaining that 'this tool doesn't do what the tool isn't supposed to do'.
    If duplicate columns are needed for some reason, there is the possibility of doing the same regression stored under a different name.

    Comment


    • #3
      I agree that this is not an essential feature. I'm using it to to construct a table with two panels. In the upper panel two columns are identical. In the lower panel two different variables are being interacted with some covariates (clearly the example above is reduced, to work out the issue I am raising). There are many easy "quick fixes" for this problem, like the one you suggest.

      However, it is clearly unexpected behaviour. estout accepts if it is passed a list with duplicates estimates and -- except for indicate-- handles it correctly. The problem I am raising could be indicative of an issue in the code that might take other manifestations that we do not foresee right now. Or, what if someone *accidentally* puts in the same estimate twice and instead of raising an error message, all the indicators are shifted and displayed in the wrong columns?

      In my own code I am generally trying to tie up all lose ends and either cast error messages when it is invoked in ways that are not intended or handle those cases correctly. I thought maybe the author of estout feels the same way. I'm just putting this out here, he's free to ignore it if he wants. (Also note: I am not "complaining")

      Comment


      • #4
        This has been fixed here: https://www.statalist.org/forums/for...lable-from-ssc

        Comment

        Working...
        X