Announcement

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

  • Bootstrap standard error control function

    I am trying to bootstrap the standard from a control function approach. They are massively off, the non-bootstrapped SE's are much closer to the ivreg2 SEs. Using robust or not does change this.

    Anybody has an idea what is going on?

    Below an example based on Wooldridge's fish data.

    Code:
    // Programs
    *ssc install bcuse
    *ssc install ivreg2
    
    bcuse fish, clear
    
    rename lavgprc p
    rename ltotqty q
    qui su speed2, det
    gen stormy = (speed2 > r(p50))
    
    capture program drop cf
    program define cf
        capture drop resid
        qui reg q stormy i.mon i.tues i.wed i.thurs
        predict resid, resid
        reg p q i.mon i.tues i.wed i.thurs resid
    end
    
    
    // 1. 2SLS
    ivreg2 p i.mon i.tues i.wed i.thurs (q = stormy)
    
    // 2. Control Function
    cf
    
    // 3. Bootstrapped Control Function
    bootstrap, reps(1000) seed(12345) : cf


    Last edited by Henry Strawforrd; 11 Nov 2022, 07:07.

  • #2
    .
    Last edited by Henry Strawforrd; 11 Nov 2022, 07:12.

    Comment


    • #3
      I am not really sure if this is a valid comparison. As far as I see you have a main function of interest, which is:

      Code:
       ivreg2 p i.mon i.tues i.wed i.thurs (q = stormy)
      Why dont you bootstrap this, something like?

      Code:
      bootstrap: ivreg2 p i.mon i.tues i.wed i.thurs (q = stormy)
      Then you can compare analytic and bootstrap SEs for the exact same command. What you show in the example looks like you compare two different approaches / commands.
      Best wishes

      Stata 18.0 MP | ORCID | Google Scholar

      Comment


      • #4
        Usually, control function estimation techniques are used when there is no closed form 2sls solution. Imagine for example your first stage is a ppml model. In that case, we want to use the bootstrap to approximate the 2sls solution. If that procedure is legitimate, then it should give similar results for the linear case (where we know the solution).

        Comment

        Working...
        X