Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: constant option in fixed and random logistic regression with time indicators
From
Nahla Betelmal <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: constant option in fixed and random logistic regression with time indicators
Date
Mon, 23 Sep 2013 15:41:38 +0100
Dear Statalist,
I am using logit fixed and random logistic regressions on my data ,
Stata version 12 . However, I have found some difficulties in
understanding their commands in Stata.
I do not understand why fixed effect command ( xtlogit, fe) or
(clogit, i(group) produces a regression without a constant term. this
is a source of concern to me because I am controlling for year effect
in my regression using i.year ( I have years 1993 to 2010) as one of
the independent variables.
the fixed effect logistic regression will produce the result without
a constant and omit one of the years as well. As you can see from the
the output below , there is no constant and no year for 1993.
I am worried that there is a bias in the fixed effect model because it
omits both the constant and the base year altogether . Is there a way
to include a constant or the base year dummy in the fixed effect
model? I understand that we can not include both together due to the
dummy-trap, only one should be included. the fixed logistic model
seems to drop both!
. xtlogit To IV1 IV2 IV3 i.year, or fe
note: multiple positive outcomes within groups encountered.
note: 879 groups (3751 obs) dropped because of all positive or
all negative outcomes.
Conditional fixed-effects logistic regression Number of obs = 10342
Group variable: gvkey Number of groups = 1254
Obs per group: min = 2
avg = 8.2
max = 18
LR chi2(29) = 1212.25
Log likelihood = -3837.8092 Prob > chi2 = 0.0000
------------------------------------------------------------------------------------------
To | OR Std. Err. z P>|z|
[95% Conf. Interval]
-------------------------+----------------------------------------------------------------
IV1 | 1.412172 .1186089 4.11 0.000
1.197829 1.66487
IV2 | .8076188 .0256471 -6.73 0.000
.7588838 .8594835
IV3 | 1.308746 .3431965 1.03 0.305
.7827841 2.188107
|
year |
1994 | 1.880812 .5677725 2.09 0.036
1.040849 3.398623
1995 | 2.680557 .7873787 3.36 0.001
1.507286 4.767102
1996 | 2.283253 .68579 2.75 0.006
1.267331 4.113562
1997 | 3.572044 1.043096 4.36 0.000
2.015357 6.331138
1998 | 25.63506 7.222488 11.51 0.000
14.75756 44.53014
1999 | 34.39778 9.736953 12.50 0.000
19.75066 59.90725
2000 | 34.67391 9.890064 12.43 0.000
19.82503 60.64453
2001 | 27.87145 8.018454 11.57 0.000
15.85893 48.98299
2002 | 25.53222 7.345258 11.26 0.000
14.52814 44.87115
2003 | 25.24796 7.294939 11.17 0.000
14.33135 44.48008
2004 | 31.73301 9.207977 11.91 0.000
17.96875 56.04084
2005 | 37.77634 11.09489 12.37 0.000
21.24332 67.17649
2006 | 32.32968 9.584978 11.72 0.000
18.08175 57.80459
2007 | 32.13949 9.550568 11.68 0.000
17.9513 57.5416
2008 | 27.4974 8.208442 11.10 0.000
15.3177 49.36166
2009 | 18.87728 5.671577 9.78 0.000
10.47612 34.01562
2010 | 27.66689 8.30931 11.06 0.000
15.35732 49.84311
------------------------------------------------------------------------------------------
I also tried to enter the year dummies manually , but still no
constant and one year got omitted.
I want to test the same equation under random effect, however, random
effect allows for option to show or suppress a constant (why fixed
effect does not have it?) . So, if I suppress the constant term in the
random effect model I get similar results to the fixed effect one, but
if I allow the constant term, IV3 becomes significant.
Random effect with NO constant
xtlogit To IV1 IV2 IV3 i.year, or nocon
Random-effects logistic regression Number of obs = 14093
Group variable: gvkey Number of groups = 2133
Random effects u_i ~ Gaussian Obs per group: min = 1
avg = 6.6
max = 18
Wald chi2(29) = 1392.73
Log likelihood = -7350.075 Prob > chi2 = 0.0000
------------------------------------------------------------------------------------------
To | OR Std. Err. z P>|z|
[95% Conf. Interval]
-------------------------+----------------------------------------------------------------
IV1 | 1.455917 .0966588 5.66 0.000 1.278277
1.658243
IV2 | .8167012 .0232345 -7.12 0.000
.7724088 .8635334
IV3 | 1.261685 .2880741 1.02 0.309
.8064927 1.973792
year |
1994 | .7614881 .183525 -1.13 0.258
.4748063 1.221265
1995 | 1.243601 .2789643 0.97 0.331
.8011978 1.930289
1996 | 1.042708 .2424268 0.18 0.857
.6610905 1.644617
1997 | 1.575768 .3467249 2.07 0.039
1.023759 2.42542
1998 | 11.90875 2.420022 12.19 0.000
7.99632 17.73544
1999 | 15.51208 3.16732 13.43 0.000
10.39605 23.14578
2000 | 15.44036 3.155944 13.39 0.000
10.34369 23.04832
2001 | 12.55376 2.579917 12.31 0.000
8.391581 18.78035
2002 | 11.54242 2.361687 11.95 0.000
7.729178 17.23697
2003 | 11.13248 2.286437 11.73 0.000
7.44335 16.65004
2004 | 14.2687 2.941321 12.89 0.000
9.526197 21.37221
2005 | 16.80113 3.503443 13.53 0.000
11.16458 25.28335
2006 | 14.19136 2.989611 12.59 0.000
9.390885 21.44578
2007 | 13.45456 2.782081 12.57 0.000
8.97142 20.17797
2008 | 11.99456 2.453953 12.14 0.000
8.03226 17.91144
2009 | 8.05653 1.669634 10.07 0.000
5.367168 12.09347
2010 | 12.19368 2.523583 12.08 0.000
8.127773 18.29355
-------------------------+----------------------------------------------------------------
/lnsig2u | .750443 .0644942
.6240366 .8768493
-------------------------+----------------------------------------------------------------
sigma_u | 1.455314 .0469297
1.36618 1.550263
rho | .3916446 .0153663
.361973 .4221391
------------------------------------------------------------------------------------------
Likelihood-ratio test of rho=0: chibar2(01) = 1634.51 Prob >= chibar2 = 0.000
Random effect with constant
xtlogit To IV1 IV2 IV3 i.year, or
Random-effects logistic regression Number of obs = 14093
Group variable: gvkey Number of groups = 2133
Random effects u_i ~ Gaussian Obs per group: min = 1
avg = 6.6
max = 18
Wald chi2(29) = 1065.65
Log likelihood = -7317.0318 Prob > chi2 = 0.0000
------------------------------------------------------------------------------------------
To | OR Std. Err. z P>|z|
[95% Conf. Interval]
-------------------------+----------------------------------------------------------------
IV1 | 1.469466 .0976402 5.79 0.000
1.290032 1.673858
IV2 | .8574825 .0247906 -5.32 0.000
.8102449 .9074741
IV3 | 1.675989 .3884926 2.23 0.026
1.064054 2.639847
|
year |
1994 | 1.695202 .501163 1.79 0.074
.9496759 3.025989
1995 | 2.733662 .7707933 3.57 0.000
1.57303 4.750646
1996 | 2.243345 .6456284 2.81 0.005
1.276212 3.943388
1997 | 3.388523 .9417797 4.39 0.000
1.965324 5.842339
1998 | 25.61627 6.784178 12.25 0.000
15.24351 43.0474
1999 | 33.15704 8.797594 13.20 0.000
19.71177 55.77326
2000 | 32.94627 8.742157 13.17 0.000
19.5859 55.42033
2001 | 26.4393 7.02571 12.32 0.000
15.70581 44.50815
2002 | 24.12863 6.388762 12.02 0.000
14.35992 40.54275
2003 | 22.92283 6.070519 11.83 0.000
13.6411 38.52006
2004 | 28.98688 7.67883 12.71 0.000
17.24694 48.71815
2005 | 33.66509 8.962688 13.21 0.000
19.97854 56.7278
2006 | 28.23259 7.557373 12.48 0.000
16.70701 47.70925
2007 | 28.13377 7.491295 12.53 0.000
16.69456 47.41119
2008 | 25.14971 6.657005 12.18 0.000
14.97008 42.25147
2009 | 16.61363 4.423448 10.55 0.000
9.858904 27.99629
2010 | 24.9653 6.632961 12.11 0.000
14.83145 42.0233
|
_cons | .0208179 .0101883 -7.91 0.000
.0079774 .0543269
-------------------------+----------------------------------------------------------------
/lnsig2u | .7355081 .064817
.6084692 .8625471
-------------------------+----------------------------------------------------------------
sigma_u | 1.444487 .0468136
1.355587 1.539217
rho | .388092 .0153925
.3583855 .4186542
------------------------------------------------------------------------------------------
Likelihood-ratio test of rho=0: chibar2(01) = 1595.59 Prob >= chibar2 = 0.000
Thank you , I highly appreciate your kind help
Nahla Betelmal
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/