Announcement

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

  • bootstrapping manually

    Dear Stata experts,

    I decided to run IV regression by hand. In the first stage, I regress my endogenous variable y on the instrument z and dependent variables a,b,c

    In the second stage, I want to run the regression on my dependent variable and predicted endogenous variables, variables a,b,c, and lags of a,b,c.

    I think it isn't like in econometrics books, but in line with the economic theory, it makes sense.

    I realized that standard errors obtained in the second stage might not be correct. As a result, I cannot interpret p-values. I read something about bootstrapping that I can do it so that I obtain the right standard errors. Can someone tell me how to do it in Stata?

    I would also be grateful for some scientific articles about this issue

  • #2
    try
    Code:
    h bootstrap
    h bs

    Comment


    • #3
      Guest:
      see the wonderful 2nd edition of Microeconometrics using Stata (see Stata bookstore website for more details).
      Last edited by sladmin; 28 Aug 2023, 08:30. Reason: anonymize original poster
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Thank you so much Carlo for this good recommendation. It looks like it is quite a complicated task and my time capacity doesn't allow me to do it. Does bootstrapping change p-values substantially? I decided not to do it in my study. Could somebody recommend me an article stating that p-values generally don't differ after bootstrapping? I hope such an article exists

        Comment


        • #5
          Guest:
          you may want to take a look at:
          Code:
          . use https://www.stata-press.com/data/r17/hsng
          (1980 Census housing data)
          
          . ivregress 2sls rent pcturban (hsngval = faminc i.region), vce(bootstrap, nodots seed(123) rep(200) saving(stuff))
          
          Instrumental variables 2SLS regression            Number of obs   =         50
                                                            Wald chi2(2)    =      33.60
                                                            Prob > chi2     =     0.0000
                                                            R-squared       =     0.5989
                                                            Root MSE        =     22.166
          
          ------------------------------------------------------------------------------
                       |   Observed   Bootstrap                         Normal-based
                  rent | coefficient  std. err.      z    P>|z|     [95% conf. interval]
          -------------+----------------------------------------------------------------
               hsngval |   .0022398   .0006422     3.49   0.000     .0009811    .0034986
              pcturban |    .081516   .4220788     0.19   0.847    -.7457433    .9087753
                 _cons |   120.7065   18.01891     6.70   0.000     85.39011    156.0229
          ------------------------------------------------------------------------------
          Instrumented: hsngval
           Instruments: pcturban faminc 2.region 3.region 4.region
          
          . bstat using stuff
          
          Bootstrap results                                          Number of obs =  50
                                                                     Replications  = 200
          
                Command: ivregress 2sls rent pcturban (hsngval = faminc i.region)
          
          ------------------------------------------------------------------------------
                       |   Observed   Bootstrap                         Normal-based
                       | coefficient  std. err.      z    P>|z|     [95% conf. interval]
          -------------+----------------------------------------------------------------
               hsngval |   .0022398   .0006422     3.49   0.000     .0009811    .0034986
              pcturban |    .081516   .4220788     0.19   0.847    -.7457433    .9087753
                 _cons |   120.7065   18.01891     6.70   0.000     85.39011    156.0229
          ------------------------------------------------------------------------------
          
          .
          Last edited by sladmin; 28 Aug 2023, 08:30. Reason: anonymize original poster
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment

          Working...
          X