Announcement

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

  • Apply multiple transformations to different models (estout)

    When making tables using esttab, I know it's possible to apply a transformation to just some models by adding an option like:

    Code:
    local scalefac = 100
    esttab model1 model2 model3,
    transform(@*`scalefac' `scalefac', pattern(1 0 0))
    Is it possible to apply a different transformation to different models? For example, I'd like to do:

    Code:
    local scalefac = 100
    local scalefac2 = 200
    esttab model1 model2 model3,
    transform(@*`scalefac' `scalefac', pattern(1 0 0))
    transform(@*`scalefac2' `scalefac2', pattern(0 1 0))
    Thank you!

  • #2
    estout is from SSC (FAQ Advice #12). I think -transform()- allows exactly one transformation, but I may be wrong. You could manipulate the matrix and repost using erepost from SSC.

    Code:
    sysuse auto, clear
    reg mpg weight  
    mat b= e(b)*100
    mat V= e(V)*100^2
    erepost b=b, rename
    erepost V=V
    est sto m1
    
    eststo m2: reg mpg weight disp 
    eststo m3: reg mpg weight disp turn
    local scalefac2 = 200
    esttab m*, transform(@*`scalefac2' `scalefac2', pattern(0 1 0))
    Res.:

    Code:
    . esttab m*, transform(@*`scalefac2' `scalefac2', pattern(0 1 0))
    
    ------------------------------------------------------------
                          (1)             (2)             (3)   
                          mpg             mpg             mpg   
    ------------------------------------------------------------
    weight             -0.601***       -1.313***     -0.00593***
                     (-11.60)         (-5.63)         (-4.14)   
    
    displacement                        1.056         0.00560   
                                       (0.54)          (0.56)   
    
    turn                                               -0.139   
                                                      (-0.77)   
    
    _cons              3944.0***       8016.9***        43.59***
                      (24.44)         (19.84)          (8.78)   
    ------------------------------------------------------------
    N                      74              74              74   
    ------------------------------------------------------------
    t statistics in parentheses
    * p<0.05, ** p<0.01, *** p<0.001

    Comment


    • #3
      This worked perfectly. Thank you!

      Comment

      Working...
      X