Announcement

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

  • Averaging IV parameters across samples

    Hi statalist,

    I am looking into ways to average IV estimates across different sample ( and test their significance). To simplify my problem, let's say I have a variable X taking two value (1 and 2). I implement an IV regression for each value of X and would like to calculate the average effect. I though that I could do that:

    ivreg Y (D=Z*X Z) X

    with D the endogenous variable and Z the instrument and Y the dependent variable.

    As it turns out, when stacking both IV regression to compare both estimate as advised here
    https://www.stata.com/statalist/arch.../msg01493.html

    I do not find the same results but they are very close. Here is an example with Z=tenure D=hours X=south


    est clear
    sysuse nlsw88, clear
    * estimation without interaction
    ivreg wage (hours=tenure ) if south==1
    est sto south1
    sca n1=e(N)
    ivreg wage (hours=tenure ) if south==0
    est sto south0
    sca n0=e(N)

    preserve
    expand 2
    bys idcode: g n=_n-1
    keep if (n==0&south==0)|(n==1&south==1)

    forval k=0/1 {
    foreach j in tenure hours south {
    g `j'`k'=`j'*(n==`k' | south==`k')
    }
    }

    ivreg wage (hours?=tenure?) n, cl(idcode)
    lincom n0/(n1+n0)*_b[hours0]+n1/(n1+n0)*_b[hours1]
    // gives an average effect of .5742095


    est sto stacked
    restore
    esttab south1 south0 stacked, nogaps mti
    gen inter=tenure*south
    xi:ivreg wage (hours=tenure inter) south, cl(idcode)
    // gives .5746572

    It is very close but not quite the same. Does it make sense for you that the IV regression with interaction term should give the same results than the stacked IV reg? If yes, why don't I find the same results?

    Thanks for your inputs




  • #2
    You didn't get a quick answer. You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. A simpler post would also help.

    If (and I having puzzled through what you did) the interaction is done right, yes, it can be the same as running the two separately or stacked. When you get the same value to 3 significant figures, I think you can decide they're the same. There are small calculation and rounding differences since the calculations are done differently.

    Comment


    • #3
      Thanks Phil. I will try to provide stata in code delimiter in the future and have clearer posts.

      On the substance, the interaction I implement is the following:
      Code:
      sysuse nlsw88, clear
      xi: ivreg wage (hours=i.tenure*i.south ) south
      Is it the interaction you have in mind?

      I disagree though that if it is close enough, we should consider as equivalent. My understanding is that we should find the exact same results (especially in such example where there are no missing values and no additional control variables). There is still something I do not entirely understand. If you guys have an idea let me know.

      Comment

      Working...
      X