Announcement

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

  • IV-Probit using Lewbel IV with ivreg2h - How to store first stage fitted values?

    Hello,

    I currently try to estimate an IV Probit using Lewbel's heteroscedasticity based IV-Method.

    Lewbel, A, 2012. Using Heteroscedasticity to Identify and Estimate Mismeasured and Endogenous Regressor Models. Journal of Business and Economic Statistics, 30:1, 67-80.

    I would like to apply this approach on a a Probit IV estimation. Kit Baum has written ivreg2h and my initial idea was to store the first stage fitted values of the endogenous variable and then plug them into a probit model and bootstrap the standard errors.

    Thus, I tried to estimate:

    ivreg2h y1 x1 x2 (y2=)
    estimates restore _ivreg2_y2
    predict y2_hat

    bootsrap, reps(1000): probit y1 x1 x2 y2_hat

    However, it did not work. Having a quick look at the source code of ivreg2h I saw that it is based on xtivreg2 which caused the error message after "estimates restore _ivreg2_y2" as it does not allow saving the fitted values from the first stage. I therefore adjusted the code marginally and replaced xtivreg2 by ivreg2. The "estimates restore _ivreg2_y2" command worked after this step and said that "results _ivreg2_price_gv are active now". However, the subsequent "predict y2_hat" command produced the following message:

    variable __00000G not found.
    r(111);

    __00000G is one of the heteroscedasticity based instruments generated by the ivreg2h. Is there an option to solve this issue? I would appreciate any help.

    Thanks and best wishes
    Sven


    Last edited by Sven Heim; 18 Jan 2017, 16:11.

  • #2
    Ok I think I found a solution. I estimate:

    ivreg2 y2 x1 x2
    predict res, res
    center x1 x2
    gen c_x1_res=c_x1*res
    gen c_x2_res=c_x2*res
    ivreg2 y2 x1 x2 c_x1_res c_x2_res
    predict y2_hat

    then
    bootstrap: ivreg2 y1 y2_hat x1 x2
    gives the same coefficients as
    ivreg2h y1 (y2=) x1 x2

    Thus, I can estimate the probit
    bootstrap: probit y1 2_hat x1 x2
    Last edited by Sven Heim; 18 Jan 2017, 17:32.

    Comment


    • #3
      Unfortunately it is not possible to edit posts. Anyway, I found an error in my idea as IV in Probit uses control function rather than fitted values of the endogenous variables. Thus, the correct command should be (hopefully):

      ivreg2 y2 x1 x2
      predict res, res
      center x1 x2
      gen c_x1_res=c_x1*res
      gen c_x2_res=c_x2*res
      ivreg2 y2 x1 x2 c_x1_res c_x2_res
      predict y2_hat
      predict res_y2, res

      then
      bootstrap: ivreg2 y1 y2_hat x1 x2
      gives the same coefficients as
      ivreg2h y1 (y2=) x1 x2

      Thus, I can estimate the probit by:
      bootstrap: probit y1 y2 x1 x2 res_y2

      Is this correct? If so, from my understanding this approach should only work if the endogenous variable is continuos.However, I wonder what would be an appropriate approach if the endogenous variable is also binary? Is a Linear Probability Modell (e.g. ivreg2h) more appropriate under these circumstances?

      Best
      Sven
      Last edited by Sven Heim; 19 Jan 2017, 07:33.

      Comment

      Working...
      X