Announcement

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

  • Bootstrap in table

    Hello,

    I want the results after bootstrap in a table. Can one of you tell me what I am doing wrong here and why I get only the last one in the table and not all 4?
    The bootstrap is just the last step. The matching etc. comes before. The whole file is quite big.



    Code:
    //vanilla
    set seed 1
    bootstrap ATT_1 = r(ATT1) ATT_0 = r(ATT0) Pr_D1D2 = r(PrD1D2) ATT_final = r(PrD1GivenD2), reps(2) nodrop: ATT_psmatch2
    //k-nearest neighbor
    set seed 1
    bootstrap ATT_1 = r(ATT1) ATT_0 = r(ATT0) Pr_D1D2 = r(PrD1D2) ATT_final = r(PrD1GivenD2), reps(2) nodrop: ATT_psmatch2_knn
    //kernel
    set seed 1
    bootstrap ATT_1 = r(ATT1) ATT_0 = r(ATT0) Pr_D1D2 = r(PrD1D2) ATT_final = r(PrD1GivenD2), reps(2) nodrop: ATT_psmatch2_kernel
    //radius
    set seed 1
    bootstrap ATT_1 = r(ATT1) ATT_0 = r(ATT0) Pr_D1D2 = r(PrD1D2) ATT_final = r(PrD1GivenD2), reps(2) nodrop: ATT_psmatch2_radius
    //llr
    set seed 1
    bootstrap ATT_1 = r(ATT1) ATT_0 = r(ATT0) Pr_D1D2 = r(PrD1D2) ATT_final = r(PrD1GivenD2), reps(2) nodrop: ATT_psmatch2_llr
    
    
    
    
    
    esttab, star(* 0.10 ** 0.05 *** 0.01) keep(ATT_1 ATT_0 Pr_D1D2 ATT_final) order(ATT_1 ATT_0 Pr_D1D2 ATT_final) /*
    */ label beta(2) pr2 nonumbers mtitles("1" "2" "3" "4") brackets title(Table AAA: M1-M4) /*
    */ nonotes addnotes("Note:." /*
    */ "Standardized beta coefficients; t statistics in parentheses; * p<0.10, ** p<0.05, *** p<0.01.")
    
    eststo clear
    Stata gives me:


    Code:
    . esttab, star(* 0.10 ** 0.05 *** 0.01) keep(ATT_1 ATT_0 Pr_D1D2 ATT_final) order(ATT_1 ATT_0 Pr_D1D2 ATT_final) /*
    > */ label beta(2) pr2 nonumbers mtitles("1" "2" "3" "4") brackets title(Table AAA: M1-M4) /*
    > */ nonotes addnotes("Note:." /*
    > */ "Standardized beta coefficients; t statistics in parentheses; * p<0.10, ** p<0.05, *** p<0.01.")
    
    added matrix:
                   e(beta) :  1 x 4
    
    Table AAA: M1-M4
    ------------------------------------
                                    1   
    ------------------------------------
    ATT_1                            *  
                              [-1.73]   
    
    ATT_0                               
                               [0.68]   
    
    Pr_D1D2                          ***
                             [367.09]   
    
    ATT_final                           
                               [0.09]   
    ------------------------------------
    Observations                 6629   
    Pseudo R-squared                    
    ------------------------------------
    Note:.
    Standardized beta coefficients; t statistics in parentheses; * p<0.10, ** p<0.05, *** p<0.01.
    
    .
    . eststo clear
    
    .
    end of do-file
    
    .
    Kind regards
    Dominik

  • #2
    To output multiple estimates with esttab you need to store those estimates first and tell esttab which estimates to output. Each time you issue an estimation command the matrix with the results of the previous estimation is overwritten.

    For more information see
    Code:
    help estimates

    Comment

    Working...
    X