Announcement

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

  • Lewbel instrumental variable approach



    In his paper titled "Using Heteroskedasticity to Identify and Estimate Mismeasured and Endogenous Regressor Models", Lewbel proposes an approach based on heteroskedasticity to create an instrument when a good candidate is not available. He also released the Stata command (ivreg2h) implementing his approach.

    I am able to replicate ivreg2h output for the case in which there are no fixed effects, but not for the case in which there are fixed effects ( the case in which I am interested).

    Using the example in the Stata help file:
    bcuse engeldat, clear
    center age-twocars, prefix(z_)
    ivreg2h foodshare z_* (lrtotexp=)
    The same output can be obtained without usingthee command by doing the following:
    * First stage Lewbel to get residuals
    reg lrtotexp age age2 agesp agesp2 spwork s1 s2 s3 washer gasheat onecar twocars
    predict r, residuals
    * create the instruments
    foreach var in z_age z_age2 z_agesp z_agesp2 z_spwork z_s1 z_s2 z_s3 z_washer z_gasheat z_onecar z_twocars {
    gen z`var'= `var'* r
    }

    * Now do 2sls
    ivreg foodshare z_* ( lrtotexp= zz_*)
    However, I am not able to replicate the FE example:
    webuse grunfeld, clear
    xtset company time
    gen L1kstock = L1.kstock
    gen L2kstock = L2.kstock
    ivreg2h invest L1kstock L2kstock (mvalue=), fe
    The code I created is the following:

    center L1kstock L2kstock, prefix(z_)
    xtreg mvalue L1kstock L2kstock, fe
    predict r, residuals
    foreach var in z_L1kstock z_L2kstock {
    gen z`var' = `var'* (r)
    }

    xtivreg invest L1kstock L2kstock (mvalue = zz_*), fe
    However, I get different results.

    Does anyone know what am I doing wrong?

    Thanks!
    Last edited by Davide Proserpio; 16 Feb 2018, 17:27.

  • #2
    Hi Davide,
    I believe the problem you are having is that you are assuming that the fixed effects are not affected by the procedure.
    Let me explain it better. You know that xtreg , leaving details regarding the estimation of the standard errors, will give you the same results as if you just added a set of all dummies involved in the fixed effect variable
    say,
    Code:
    xtset firmid year
    xtreg output capital labor i.year, fe
    * Will give you the same point estimates as in 
    reg output capital labor i.year i.firmid
    If this is the case, then you could assume each fixed effect is one additional dummy variable that you need both to center and multiply with the residuals of the original model before you include them back to your model (for the instrument).
    In other words, I would suspect the IVregh creates the Hetoreskedastic Instrument for the Fixed effects too, whereas in your case you are not including them.
    HTH
    Fernando

    Comment


    • #3
      Thanks Fernando,

      What you said makes sense. However, even adding the fixed effect I am not getting the same results (although they are closer to the ivreg2h output now) :/

      I did something like this:
      Code:
      webuse grunfeld, clear xtset company time gen L1kstock = L1.kstock gen L2kstock = L2.kstock center L1kstock L2kstock, prefix(z_) xtreg mvalue L1kstock L2kstock, fe predict r, residuals predict u_hat, u center u_hat, prefix(z_) foreach var in z_L1kstock z_L2kstock z_u_hat { gen z`var' = `var'* r } *ivreg xtivreg invest L1kstock L2kstock (mvalue = zz_*), fe * lewbel command ivreg2h invest L1kstock L2kstock (mvalue=), fe

      Comment


      • #4
        Hi Davide,

        I think it may be in your specifications of how you center the variables. "center age-twocars, prefix(z_)" will standardize the variables but I think you want to center them according to your fixed effects.
        Last edited by Samia Badji; 03 Aug 2018, 23:47.

        Comment

        Working...
        X