Hi everyone, I really need your help. I'm doing some OLS and IV regressions on stata and I have a problem with inserting fixed effects.
The data I have available are:
1) for each trio municipality sector year: the number of active companies
2) coverage of the UBB network for each joint pair.
The aim is to estimate the random effect of the UBB network on the log of active companies.
I have to introduce 2 fixed effects:
1) on a joint variable region-year
2) on a joint variable municipality-sector.
I used the areg + absorb command in OLS regress and it worked fine on single fixed effect.
The problem is when I have to introduce all 2 of them into the same regression analysis. They told me to create the dummy vector for the joint variable region-year with the command "ta joint_region_year, generate (dummy_joint_region_year)" and to insert this vector inside the regression as a simple control variable and use absorb with the joint variable city-sector. I tried to add it using * (dummy_joint_region_year *) but the result is a regression with hundreds of lines and the robust standard error = 0. I also tried to use the xtset and xtreg commands, but I can't define the panel, I get the error 451: repeated time values within panel.
Also I don't know how to introduce the fixed effects into IV regression except with the xtivreg command (that I can't use for the same panel problem).
I have been using stata for a few weeks, I don't have much time available and I don't know what to do.
Thank you in advance.
The data I have available are:
1) for each trio municipality sector year: the number of active companies
2) coverage of the UBB network for each joint pair.
The aim is to estimate the random effect of the UBB network on the log of active companies.
I have to introduce 2 fixed effects:
1) on a joint variable region-year
2) on a joint variable municipality-sector.
I used the areg + absorb command in OLS regress and it worked fine on single fixed effect.
The problem is when I have to introduce all 2 of them into the same regression analysis. They told me to create the dummy vector for the joint variable region-year with the command "ta joint_region_year, generate (dummy_joint_region_year)" and to insert this vector inside the regression as a simple control variable and use absorb with the joint variable city-sector. I tried to add it using * (dummy_joint_region_year *) but the result is a regression with hundreds of lines and the robust standard error = 0. I also tried to use the xtset and xtreg commands, but I can't define the panel, I get the error 451: repeated time values within panel.
Also I don't know how to introduce the fixed effects into IV regression except with the xtivreg command (that I can't use for the same panel problem).
I have been using stata for a few weeks, I don't have much time available and I don't know what to do.
Thank you in advance.
Comment