Announcement

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

  • How to overcome the word limitation of 12 in Stata output table when using esttab?

    I remember somewhere that the word limitation for variable name in Stata is 12, and I try with esttab and it shows the same thing. My code is

    Code:
    esttab m1 m2 m3 m4 m5 m6 m7 ,star(* 0.1 ** 0.05 *** 0.01) nomtitles ar2 p title(" Just titley") keep($ccccovariates) coeflab(wFIRM_SIZE  "Firm
    >  size"  LNGDP "Ln(GDP)" UNEMPLOYMENT "Unemployment"  wTANGIBILITY "Tangibility" wLAG_SAL_GRO "Lag(sale growth)" )
    And it shows that

    Click image for larger version

Name:	aaa.PNG
Views:	1
Size:	6.2 KB
ID:	1646744

    I am wondering is there any way to come over this issue? If not, I may only shorten the variable name.
    Thanks in advance

  • #2
    I don't know why this would matter, when you export the table to wherever you're writing it with, it won't come out cut off, will it?

    Comment


    • #3
      The output of help esttab not only gives options for esttab, but also tells us that since it's built on estout all the estout options are also passed through. And the output of help estout tells us that its varwidth() option will solve your problem.
      Code:
      . sysuse auto, clear
      (1978 automobile data)
      
      . generate weight_in_ounces = 16*weight
      
      . quietly regress price weight_in_ounces
      
      . esttab
      
      ----------------------------
                            (1)   
                          price   
      ----------------------------
      weight_in_~s        0.128***
                         (5.42)   
      
      _cons              -6.707   
                        (-0.01)   
      ----------------------------
      N                      74   
      ----------------------------
      t statistics in parentheses
      * p<0.05, ** p<0.01, *** p<0.001
      
      . esttab, varwidth(20)
      
      ------------------------------------
                                    (1)   
                                  price   
      ------------------------------------
      weight_in_ounces            0.128***
                                 (5.42)   
      
      _cons                      -6.707   
                                (-0.01)   
      ------------------------------------
      N                              74   
      ------------------------------------
      t statistics in parentheses
      * p<0.05, ** p<0.01, *** p<0.001
      
      .

      Comment


      • #4
        Originally posted by William Lisowski View Post
        The output of help esttab not only gives options for esttab, but also tells us that since it's built on estout all the estout options are also passed through. And the output of help estout tells us that its varwidth() option will solve your problem.
        Code:
        . sysuse auto, clear
        (1978 automobile data)
        
        . generate weight_in_ounces = 16*weight
        
        . quietly regress price weight_in_ounces
        
        . esttab
        
        ----------------------------
        (1)
        price
        ----------------------------
        weight_in_~s 0.128***
        (5.42)
        
        _cons -6.707
        (-0.01)
        ----------------------------
        N 74
        ----------------------------
        t statistics in parentheses
        * p<0.05, ** p<0.01, *** p<0.001
        
        . esttab, varwidth(20)
        
        ------------------------------------
        (1)
        price
        ------------------------------------
        weight_in_ounces 0.128***
        (5.42)
        
        _cons -6.707
        (-0.01)
        ------------------------------------
        N 74
        ------------------------------------
        t statistics in parentheses
        * p<0.05, ** p<0.01, *** p<0.001
        
        .
        Its is a really great solution. Thanks a heap, William.

        Comment

        Working...
        X