Hello!
I am looking for help regarding the margins command. I am running xtreg using state-year panel data and I want to test for different effects for states with high and low birthrates using interaction terms, but when I run the margins command I'm getting a result that is "not estimable." I am trying to estimate margins using the following code:
Note: c1year-c8year are census region time interactions to account for region specific trends.
In the above case, xtreg returns the following output:
And the margins command returns the following:
In trying to identify the problem I played around with a few other configuration of the model. The following also returns "not estimable:"
If I don't weight or cluster the margins command works just fine, and the following code returns normal results:
Meanwhile, this returns an error that says "aweight not allowed:"
Does anyone have any thoughts as to why I'm not getting estimates for the original code? Any help would be much appreciated.
Thanks,
Lea
I am looking for help regarding the margins command. I am running xtreg using state-year panel data and I want to test for different effects for states with high and low birthrates using interaction terms, but when I run the margins command I'm getting a result that is "not estimable." I am trying to estimate margins using the following code:
Code:
xtreg birthrate c.simelig##i.highbirthrate i.year c1year-c8year [aweight=populationmean], fe vce(cluster fips) margins, dydx(simelig) at(highbirthrate=(0 1))
In the above case, xtreg returns the following output:
Code:
note: 1.highbirthrate omitted because of collinearity
Fixed-effects (within) regression Number of obs = 714
Group variable: fips Number of groups = 51
R-sq: within = 0.9509 Obs per group: min = 14
between = 0.3664 avg = 14.0
overall = 0.0326 max = 14
F(23,50) = 280.65
corr(u_i, Xb) = -0.3530 Prob > F = 0.0000
(Std. Err. adjusted for 51 clusters in fips)
---------------------------------------------------------------------------------
| Robust
birthrate | Coef. Std. Err. t P>|t| [95% Conf. Interval]
----------------+----------------------------------------------------------------
simelig | .0281689 .0224591 1.25 0.216 -.0169417 .0732794
1.highbirthrate | 0 (omitted)
|
highbirthrate#|
c.simelig |
1 | -.1151857 .0282641 -4.08 0.000 -.1719558 -.0584157
|
year |
1991 | -1.326654 .2133969 -6.22 0.000 -1.755274 -.8980335
1992 | -1.981944 .3023724 -6.55 0.000 -2.589277 -1.374612
1993 | -2.707751 .4849461 -5.58 0.000 -3.681794 -1.733708
1994 | -4.855094 .6516258 -7.45 0.000 -6.163923 -3.546265
1995 | -7.590643 .9927567 -7.65 0.000 -9.584654 -5.596633
1996 | -9.993006 1.182542 -8.45 0.000 -12.36821 -7.617801
1997 | -11.91885 1.455844 -8.19 0.000 -14.843 -8.994706
1998 | -13.71345 1.58068 -8.68 0.000 -16.88833 -10.53856
1999 | -15.06773 1.789333 -8.42 0.000 -18.66171 -11.47374
2000 | -18.01335 1.937266 -9.30 0.000 -21.90446 -14.12224
2001 | -19.85275 2.057514 -9.65 0.000 -23.98539 -15.72011
2002 | -21.28267 2.169835 -9.81 0.000 -25.64091 -16.92443
2003 | -21.94815 2.259343 -9.71 0.000 -26.48617 -17.41013
|
c1year | .6410636 .2012706 3.19 0.002 .2367998 1.045327
c2year | .5668106 .2027973 2.79 0.007 .1594802 .974141
c3year | .5823073 .2162658 2.69 0.010 .1479247 1.01669
c4year | .9935927 .1900171 5.23 0.000 .6119321 1.375253
c5year | .3884749 .1967836 1.97 0.054 -.0067765 .7837263
c6year | .3084339 .2081009 1.48 0.145 -.1095491 .7264169
c7year | .6459406 .2272479 2.84 0.006 .1894997 1.102382
c8year | .7960811 .2041904 3.90 0.000 .3859526 1.20621
_cons | 39.29763 .4062755 96.73 0.000 38.4816 40.11366
----------------+----------------------------------------------------------------
sigma_u | 12.173588
sigma_e | 1.4760461
rho | .98551147 (fraction of variance due to u_i)
---------------------------------------------------------------------------------
Code:
Average marginal effects Number of obs = 714
Model VCE : Robust
Expression : Linear prediction, predict()
dy/dx w.r.t. : simelig
1._at : highbirthrate = 0
2._at : highbirthrate = 1
------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
simelig |
_at |
1 | . (not estimable)
2 | . (not estimable)
------------------------------------------------------------------------------
Code:
xtreg birthrate c.simelig##i.highbirthrate i.year c1year-c8year, fe vce(cluster fips) margins, dydx(simelig) at(highbirthrate=(0 1))
Code:
xtreg birthrate c.simelig##i.highbirthrate i.year c1year-c8year margins, dydx(simelig) at(highbirthrate=(0 1))
Code:
xtreg birthrate c.simelig##i.highbirthrate i.year c1year-c8year [aweight=populationmean] margins, dydx(simelig) at(highbirthrate=(0 1))
Thanks,
Lea

Comment