In my research, for example, trunk is the endogenous independent variable of interest and headroom is the instrument variable for trunk. Both headroom and trunk is continuous variable.
Let’s assume we are interested in the parameter estimates of the following recursive model:
Code:
sysuse auto,clear ivreg2 price displacement (trunk=headroom), robust
In OLS, I can create 3 bins of trunk according to the value of trunk is high/middle/low, in stata:
Code:
sysuse auto.dta, clear sum trunk, detail gen trunk_high=(trunk>=`r(p75)') gen trunk_mid=(trunk>`r(p25)' & trunk<`r(p75)') gen trunk_low=(trunk<=`r(p25)') reg price trunk_high trunk_mid trunk_low displacement, robust
Is the following code correct?
Code:
sysuse auto.dta, clear sum trunk, detail gen trunk_high=(trunk>=`r(p75)') gen trunk_mid=(trunk>`r(p25)' & trunk<`r(p75)') gen trunk_low=(trunk<=`r(p25)') reg trunk displacement predict trunk_hat sum trunk_hat, detail gen trunk_hat_high=(trunk_hat>=`r(p75)') gen trunk_hat_mid=(trunk_hat>`r(p25)' & trunk_hat<`r(p75)') gen trunk_hat_low=(trunk_hat<=`r(p25)') ivreg2 price displacement (trunk_high trunk_mid trunk_low = trunk_hat_high trunk_hat_mid trunk_hat_low), robust
0 Response to instrument variable when using bins of endogenous independent variable as independent variables
Post a Comment