I am running a fixed-effect model using xtivreg2 in stata, where my panel variable is firms and my time variable is years. It is survey data that tracks firms over year through different iterations of the survey. Let me begin by saying that in my original dataset, the panel variable idpanel is always repeated at least once. That is, there are no firms which are observed for only one year. There are also no missing idpanel. The command is:
xtivreg2 depvar var1 var2 (var3= instrument), fe ro
What happens is that xtivreg2 gives me a warning:
Warning - singleton groups detected. 4552 observation(s) not used.
Such that the number of observations for the first-stage regression is 17489, and the same for the second stage. Therefore this command is dropping observations during the first-stage regression part. So I proceeded to replicate the first stage regression using:
xtreg var3 var1 var2 instrument, fe ro
And the number of observations, 26,370, is significantly higher than its first-stage regression counterpart in xtivreg2. The coefficients are also different.
After some exploring, I've noticed that the reason is because in the first-stage regression of xtivreg2 the command drops observations whenever there is a missing in any of the covariates or the dependent variables. Afterwards it recalculates the panel, and of course it finds now some firms for which the observation has been dropped in a given year because of the aforementioned missings, but not in other years, hence it has become a singleton.
My question therefore is: why. From a theoretical point of view, a replication of the first-stage regression using xtreg should present the same results (coefficients) as the first-stage calculated within xtivreg2, no?. In my case it doesn't. Thank you all in advance.
Related Posts with fixed effect model in xtivreg2 and singletons
How to compare regression models for survey data? Usually, we use the AIC value (estat ic) to compare regression models. But estat ic command doesn't…
Cross-over RCT - multiple regression?First time posting a question, apologizes if I am not doing this correctly. I have a placebo-contro…
How do I estimate a GARCH model after estimating a VAR model?I've seen examples where people have estimated GARCH models after ARMA or ARIMA models, but how woul…
Abnormal Returns/ Average return of the market, value-weightedHi everyone. I am trying to generate abnormal returns in STATA. To do so, I need to calculate the e…
Etregress ML vs Etregress Control Function vs 2slsHello. I have a continuous outcome variable, binary endogenous variable, and continuous instrument. …
Subscribe to:
Post Comments (Atom)
0 Response to fixed effect model in xtivreg2 and singletons
Post a Comment