You are not logged in. You can browse but not post. Login or Register by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the FAQ.
There is a problem with your dataset. The year variables are overlapping: if you add up all the year variables (from 1 to 10) you should get a variable that is equal to one for all observations.
This is not the case: you have 2 for a large number of observations. I don't know how to force -xtivreg, re- to keep the constant term, and without the constant term xtoverid doesn't seem to
work. You could ask this as a separate question (a separate post).
xtivreg2 only allows for fixed effects and first difference estimators.
If I try -xtivreg2, fe cluster(company), I get the following:
. xtivreg2 netreturn sin (religiositymean sinreligiositymean = statefav sinstatefav) beta lmarketcap lpb bev lgdp spread inflationrate open law year1 year2 year3 year4 year5 year6 year7
> year8 year9 year10 country1 country2 country3 country4 country5 country6 country7, fe cluster(company)
Warning - collinearities detected
Vars dropped: sin beta bev country1 country2 country3 country4 country5
country6 country7 statefav sinstatefav
equation not identified; must have at least as many instruments
not in the regression as there are instrumented variables
r(481);
Since statefav is dropped you have underidentification.
You need to examine your data more closely and see what is really needed and whether the variables are not measuring the same thing.
I will no longer be available today and maybe tomorrow
There is a problem with your dataset. The year variables are overlapping: if you add up all the year variables (from 1 to 10) you should get a variable that is equal to one for all observations.
This is not the case: you have 2 for a large number of observations. I don't know how to force -xtivreg, re- to keep the constant term, and without the constant term xtoverid doesn't seem to
work. You could ask this as a separate question (a separate post).
xtivreg2 only allows for fixed effects and first difference estimators.
Thanks Eric for help- what do you mean I have two for a large number of observations? I have removed one of the dummies of time and country to prevent the collinearity, seems to be working in terms of keeping constant term. I have also added one more instrument. But now: Error.pdf . "xtoverid, cluster(company)
xtoverid error: internal reestimation of eqn differs from original
r(198);" occurs?
Company fe drops the time-invariant firm variables like sin and beta.That's why Im using re.
what do you mean I have two for a large number of observations?
r(198);" occurs?
If you have two years and one dummy for each year and you add up the two dummy variables, the new variable should have a value of one for each observation. If you find a value of 2, this means that the two dummy variables overlap for those observatons.
Also I assume I am correct in excluding one year and country dummy variable according the the normal process of avoiding collinearity? Because when I don't, I get no collinearity message which is odd?
Since I have no idea how you "corrected for this" and what command you ran, I cannot help you. I cannot produce your regression coefficients if I just drop year1 and company8
Sorry I corrected the overlapping by recoding my time dummies (I have accidentally put in the wrong numbers for e.g. gen year1=(time>=1 & time<=12), so there should be no overlapping.
If you use the file I have sent you, with the corrected data, and run: xtivreg netreturn sin (religiositymean sinreligiositymean= statefav sinstatefav statereg sinstatereg) beta l
> marketcap lpb bev lgdp spread inflationrate open law year2 year3 year4 year5 year6 year7 year8 year9 year10
> country1 country2 country3 country4 country5 country6 country7, re vce(cluster company)
You should get the same coefficients as me and also the error message when trying to do xtoverid.
Comment