Hi, im trying to use instrumental regression with panel data.
At first, I use xtivreg2:
xtset firm year
xtivreg2 y x1 (x2 = a b), fe robust
Then, I try to replicate the results, with ivreg2
ivreg2 y x1 (x2 = a b) i.firm i.year, robust
ivreg2 y x1 (x2 = a b) i.year, cluster(firm) robust
But both results are different from xtivreg2, fe
3 results also have same number of observations, so no singleton is removed
May I ask which function xtivreg2, fe exactly runs?
At first, I use xtivreg2:
xtset firm year
xtivreg2 y x1 (x2 = a b), fe robust
Then, I try to replicate the results, with ivreg2
ivreg2 y x1 (x2 = a b) i.firm i.year, robust
ivreg2 y x1 (x2 = a b) i.year, cluster(firm) robust
But both results are different from xtivreg2, fe
3 results also have same number of observations, so no singleton is removed
May I ask which function xtivreg2, fe exactly runs?
Comment