Announcement

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

  • Including boottest results in estimation tables

    I made two small changes to boottest to facilitate including results from the command in estimation tables built with programs such as table, esttab, outreg, and outreg2.

    1) When boottest computes confidence sets, it will now save them in r(CIstr) which is a string description. This can be as simple as "[0, 1]" or as complicated as "(−∞, −3.21] ∪ [−0.79, −0.60] ∪ [0.32, ∞)". As before, boottest also saves the confidence set bounds in the matrix r(CI).

    2) The new format() option lets you control how numbers are displayed in such strings. Type "help format" for documentation of Stata number formats.

    If you install Ben Jann's estout package, then you can use the estadd command to transfer boottest r() results to e() results in the most recent estimation results. Examples:

    Code:
    estadd scalar p = r(p)
    estadd local CIstr "`r(CIstr)'"
    Then the values will be stored in e(p) and e(CIstr). From there, I hope it will be easier to include them in estimation tables, such as with esttab's cells() or stats() option or outreg2's addstat() option.

    Install the latest version with "ssc install boottest, replace".
    --David
    Last edited by David Roodman; 20 Jul 2022, 12:07.

  • #2
    Hi,

    Can you please help me figure out how to do it for multiple variables in the regression model? I want to produce a table with p-values from boottest for all the variables, including constant.

    Here is an example of my code:

    Code:
    reg y x1 x2 x3 i.state i.year
       local vars = ustrregexra("`e(cmdline)'", "regress `e(depvar)'|i.year|i.state", "")
    foreach var of local vars{
    boottest `var',  boottype(wild) seed(12345) robust bootcluster(state) nograph  
    }
    From the above code, I am unsure how to store p-values in a matrix for x1, x2, and x3, and then produce a table using outreg2.

    Thanks,
    Ahmed.

    Comment


    • #3
      Hi ! I posted a similar question here: https://www.statalist.org/forums/for...-estadd-scalar

      Have you made any progress with this issue?

      Comment

      Working...
      X