Hello everyone,
I want to run an IV regression with several fixed effects (individual, time, region and region*time FE) and I have to incorporate the design weights of the survey data. xtivreg does not allow for weights so I was using xtivreg2. I tried the following code:
xtivreg2 worktime (share = log_IV) i.syear i.region i.fe [pweight=phrf], fe (i.fe is a dummy for each pair of region*time FE)
But I get the following error: "factor-variable operators not allowed".
I tried to use ivreg2. I got the error: "maxvarr too small" so I set maxvar 120000. I ended up with this:
ivreg2 worktime (share = log_IV) i.syear i.ror96 i.pid [pweight=phrf] if female==1 & immigrant==0
But it takes forever and I haven't even included the double FE. Also, I need a command that can give clustered standard errors.
Does someone know a more efficient way to do this? Thank you!
I want to run an IV regression with several fixed effects (individual, time, region and region*time FE) and I have to incorporate the design weights of the survey data. xtivreg does not allow for weights so I was using xtivreg2. I tried the following code:
xtivreg2 worktime (share = log_IV) i.syear i.region i.fe [pweight=phrf], fe (i.fe is a dummy for each pair of region*time FE)
But I get the following error: "factor-variable operators not allowed".
I tried to use ivreg2. I got the error: "maxvarr too small" so I set maxvar 120000. I ended up with this:
ivreg2 worktime (share = log_IV) i.syear i.ror96 i.pid [pweight=phrf] if female==1 & immigrant==0
But it takes forever and I haven't even included the double FE. Also, I need a command that can give clustered standard errors.
Does someone know a more efficient way to do this? Thank you!
Comment