I do not usually use two-stage-least-square regression technique and I am not a theorist of econometrics; thus, I hope you will pardon me for this (possibly) clumsy post.
Introduction
Let's start from the second stage. Here, I regress the outcome variable on the control variables plus the predicted covariate of interest, which comes from the first stage.
At the first stage, I regress my endogenous variable on at least one instrument, plus all of the control variables used in the second stage. The instrument has to fulfill two assumptions: i) INDEPENDENCE, that is, it cannot directly affect the outcome variable of the second stage (i.e. it has to be valid), and it has to be as good as randomly assigned; ii) MONOTONICITY, for all of the units of observation, the instrument has to affect the endogenous variable in the same direction (i.e. there are no defiers).
Moreover, the instrument cannot only weakly affect the endogenous variable.
After I have computed the estimates from this regression, I compute the predicted covariate of interest, which will be used as a covariate in the second stage (see above).
First, I describe the situation, pose my question, and then provide an example:
I do not have a proper instrumental variable in my dataset, so I have to create one.
My question is: can I compute the mean and the variance of the endogenous variable by group (i.e. by age group and by nationality) and use them as instrumental variables?
I have never seen done it, and there must be a good and banal answer for that--which I cannot see at this time of the day.
For instance, assume that my endogenous variable is x3, but this variable is endogenous only for a few people (i.e. most of the people are compliers, although there are a few never-takers and always-takers) and thus I will have to implement a 2SLS to gain a causal interpretation of b3_hat.
These are the variables: Y = salary; x1 = age; x2 = gender; x3 = education; x4 = parents' country of birth; x5 = first language
I compute the mean and the variance of education (x3) by age (x1) and gender (x2). Then I proceed as usual:
Stage 1 (endogenous variable = x3)
- x3 = z0 + z1mean_x3 + z2var_x3 + z3x1 + z4x2 + z5x4 + z6x5 + error
- compute x3_hat to be used in Stage 2
Stage 2
- Y = b0 + b1x1 + b2x2 + b3x3_hat + b4x4 + b5*x5 + error
z1 and z2 do not directly affect y. z1 and z2 return the expected level of x3--i.e. as if it was exogenous, z3-z5 tell us the individual deviation from that expected level.