Dear Statalisters,
I'm facing a problem with variables omitted in the regressions. I have listed my data as a long format.
I'm running the following two regressions:
Xtreg dep after yearafter year, fe vce(r) and
Reg dep after yearafter year
The dependent variable "dep" is either 0 or 1. "After" is a dummy(0 or 1), and "year" has a value from 1 to 5. I also made a interactive term, "yearafter," which is either 0 or 4.
When I run the following regression (fixed effect), I see that yearafter is omitted because of collinearity.
xtreg dep after yearafter year, fe vce(r)
note: yearafter omitted because of collinearity
Fixed-effects (within) regression Number of obs = 4,548
Group variable: pid Number of groups = 3,278
R-sq: Obs per group:
within = 0.0477 min = 1
between = 0.0101 avg = 1.4
overall = 0.0012 max = 4
F(2,3277) = 32.80
corr(u_i, Xb) = -0.1730 Prob > F = 0.0000
(Std. Err. adjusted for 3,278 clusters in pid)
------------------------------------------------------------------------------
| Robust
dep | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
after | -.1523807 .0419597 -3.63 0.000 -.2346506 -.0701108
yearafter | 0 (omitted)
year | .1195637 .0168031 7.12 0.000 .086618 .1525093
_cons | .3755438 .0347421 10.81 0.000 .3074253 .4436623
-------------+----------------------------------------------------------------
sigma_u | .43909427
sigma_e | .47539416
rho | .46036824 (fraction of variance due to u_i)
------------------------------------------------------------------------------
When I run the following regression, however, I see that "after" is omitted.
. reg dep after yearafter year
note: after omitted because of collinearity
Source | SS df MS Number of obs = 4,548
-------------+---------------------------------- F(2, 4545) = 12.97
Model | 5.91446943 2 2.95723471 Prob > F = 0.0000
Residual | 1036.1759 4,545 .227981496 R-squared = 0.0057
-------------+---------------------------------- Adj R-squared = 0.0052
Total | 1042.09037 4,547 .229181959 Root MSE = .47747
------------------------------------------------------------------------------
dep | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
after | 0 (omitted)
yearafter | -.0328489 .0064511 -5.09 0.000 -.0454962 -.0202016
year | .0419783 .0105605 3.98 0.000 .0212745 .0626821
_cons | .5723782 .0232908 24.58 0.000 .5267168 .6180396
------------------------------------------------------------------------------
I don't understand why "after" or "yearafter" is omitted in those regressions. Could someone help me solve this issue? Thanks in advance.
Related Posts with Variables omitted
One line code for performing arithmetic operation (here multiplication) while merging two datasetsSuppose, I have two datasets given below, now how can I merge the datasets so that resulting values …
Identifying first and second re-admissions in a health datasetI am working with Stata/MP 15.1 and have appended two datasets. Database 1 includes a list of patie…
catplot - how to show n to the left of the bars, percentages within bars, and mean values outside the bars (to the right)Dear all, I am using the community-contributed command catplot from SSC in Stata 16.1 in order to p…
doiplot - postestimation module after metan for plots that address asymmetry or heterogeneityDear All There is now a post-estimation command after metan to visualize studies in meta-analysis t…
How Can I Perform Panel Unit Root with Structural Breaks Especcially Fourier Panel KPSS TESTı want to briefly explain my data set. I have N:25 T:15 data set. I want to perform Fourier Panel KP…
Subscribe to:
Post Comments (Atom)
0 Response to Variables omitted
Post a Comment