Hi, I am running a regression with ivreghdfe (which builds on ivreg2) and I want to restore the first stage estimates. I have done so previously. Usually, I would do something like this for a single endogenous variable and a single instrument:
However, now I am working witha regression with multiple endogenous and multiple instruments, something like:
In this case, how can I call estimates restore _ivreg2_ ? I am unsure what to write after _ivreg2_ to restore estimates. I have tried the name of the first endogenous variable and `endogenous', but both did not work. I also am not sure how I can check what the name is instead of just trying to guess it.
Code:
ivreghdfe outcome (endogenous=instrument), absorb(fe) savefirst matrix first = e(first) estimates restore _ivreg2_endogenous
Code:
local endogenous = "endogenous_*" local instruments = "instrument_*" ivreghdfe outcome (`endogenous'=`instrument'), absorb(fe) savefirst
Comment