lfe icon indicating copy to clipboard operation
lfe copied to clipboard

Interacted instrumented variable

Open AakaashRao opened this issue 6 years ago • 6 comments

Suppose we wish to estimate Y ~ X1 + X2 + Q:X2|C1 + C2, where Q is instrumented by instrument Z1 (along with fixed effects C1, C2). How would we write this formula?

Thanks for this fantastic package!

AakaashRao avatar Oct 01 '18 16:10 AakaashRao

Ouch.

I never thought of that. I don't think that's doable in lfe as of now. I'll have a look into it.

sgaure avatar Oct 05 '18 07:10 sgaure

I'd be very interested in this feature too. Thanks!

P.S. It's been suggested to me that one could create the interaction term manually, which can then be instrumented in the felm regression. This might be a viable strategy if the interaction is comprised of two binary variables. However, I don't see how it can be implemented properly (valid SEs, etc.) if you have more complicated interactions (e.g. a continuous variables modified by a multi-level factor).

grantmcdermott avatar Dec 19 '18 23:12 grantmcdermott

@grantmcdermott I think the proposal in your link only works if we don't want x1 and x2 themselves in the specification -- only the interaction of the two?

AakaashRao avatar Dec 20 '18 19:12 AakaashRao

@AakaashRao Yes. In fact, I think it should give you the total marginal effect of the conditional interaction (e.g. B1 + B2*x2). So it's very limited.

Interestingly enough, the vanilla lm() function in base R allows for interactions on the LHS. For example, the following regression seems to run fine:

lm(Illiteracy * Murder ~ Income, data = as.data.frame(state.x77))

I haven't explored this thoroughly, but I wonder if that's a bridge to getting this to work in lfe?

grantmcdermott avatar Dec 20 '18 19:12 grantmcdermott

Given that it's been a year since the last message, I'm wondering if any working solutions have come up.

For a simple fixed effects model, I've estimated: Y ~ Dummy1 + Dummy2 + Dummy1:X + Dummy2:X | F1 + F2 | 0 | CLU1 + CLU2, where

• Dummies are 1 for individuals in a given group and 0 otherwise; • Y (income) varies by person, industry and time; and • X (treatment) varies by industry and time.

Coefficients for Dummy1:X and Dummy2:X give the estimated marginal effect of the treatment separately for the two groups.

I have an instrument for X (that also varies by industry and time). I'd like to use it and estimate exactly the same equation. Did I understand correctly that this is not currently possible with felm? Any suggestions for doing this in two stages and obtaining the correct standard errors?

jackbauer avatar Feb 25 '20 04:02 jackbauer

Also need this for a project, reverting to Stata (unfortunately) for now. I'm estimating a fuzzy RDD and would have liked to run something like

Y ~ running_var | F1 + F2 | (treatment|treatment:running_var ~ forcing_var + forcing_var:running_var) | CLU1

adamaltmejd avatar Oct 22 '20 18:10 adamaltmejd