代码之家  ›  专栏  ›  技术社区  ›  bill999

如何复制eststo

  •  0
  • bill999  · 技术社区  · 6 年前

    我该如何复制 eststo 埃斯特托

    例如:

    sysuse auto2, clear
    
    eststo clear
    eststo estimates1: reg price mpg rep78 headroom trunk weight length turn, robust
    estadd local aa "abc"
    estadd local bb "bcd"
    
    esttab estimates1
    

    estimates1 创造 estimates2

    eststo clear
    eststo estimates1: reg price mpg rep78 headroom trunk weight length turn, robust
        estadd scalar obs=e(N)
        estadd local aa "abc"
        estadd local bb "bcd"
    eststo estimates2: reg price mpg rep78 headroom trunk weight length turn, robust
        estadd scalar obs=e(N)
        estadd local aa "abc"
        estadd local bb "bcd"   
    esttab estimates1 estimates2, stats(obs aa bb)
    

    但有没有办法做到这样(不正确):

    eststo estimates2 = estimates1
    
    1 回复  |  直到 6 年前
        1
  •  1
  •   user8682794 user8682794    6 年前

    以下是我的作品:

    sysuse auto2, clear
    eststo clear
    
    eststo estimates1: reg price mpg rep78 headroom trunk weight length turn, robust
    
    estadd scalar obs=e(N)
    estadd local aa "abc"
    estadd local bb "bcd"
    
    eststo estimates2
    
    esttab estimates1 estimates2, stats(obs aa bb)
    

    esttab estimates1 estimates1, stats(obs aa bb)
    

    --------------------------------------------
                          (1)             (2)   
                        price           price   
    --------------------------------------------
    mpg                -104.5          -104.5   
                      (-1.21)         (-1.21)   
    
    rep78               723.2*          723.2*  
                       (2.29)          (2.29)   
    
    headroom           -656.0*         -656.0*  
                      (-2.23)         (-2.23)   
    
    trunk               79.23           79.23   
                       (1.05)          (1.05)   
    
    weight              5.286*          5.286*  
                       (2.66)          (2.66)   
    
    length             -93.33          -93.33   
                      (-1.51)         (-1.51)   
    
    turn               -196.6          -196.6   
                      (-1.24)         (-1.24)   
    
    _cons             16142.5*        16142.5*  
                       (2.08)          (2.08)   
    --------------------------------------------
    obs                    69              69                                          
    aa                    abc             abc   
    bb                    bcd             bcd   
    --------------------------------------------
    t statistics in parentheses
    * p<0.05, ** p<0.01, *** p<0.001
    
    推荐文章