Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: fixed effect logit vs naive logit


From   "Ali Karim" <Ali_Karim@jsi.com>
To   <statalist@hsphsun2.harvard.edu>, <stillman@motu.org.nz>
Subject   st: RE: fixed effect logit vs naive logit
Date   Fri, 18 Nov 2005 11:44:32 -0500

Thanks for your response. I tried the hausman test, but gives an error message (please see below). Also, I would like to know more about the incidental parameters problem, it would be great if you could point me towards a reference.
Thanks again,
Ali

. xi:xtlogit xest2 i.year_val lmis_per small diff3 i.client_cat i.product,i(code) fe
i.year_val        _Iyear_val_1995-2004(naturally coded; _Iyear_val_1995 omitted)
i.client_cat      _Iclient_ca_1-4     (naturally coded; _Iclient_ca_1 omitted)
i.product         _Iproduct_1-7       (naturally coded; _Iproduct_1 omitted)
note: multiple positive outcomes within groups encountered.
note: 2 groups (12 obs) dropped due to all positive or
      all negative outcomes.

Iteration 0:   log likelihood = -95.770645  
Iteration 1:   log likelihood = -94.766928  
Iteration 2:   log likelihood = -94.765621  
Iteration 3:   log likelihood = -94.765621  

Conditional fixed-effects logistic regression   Number of obs      =       194
Group variable (i): code                        Number of groups   =        12

                                                Obs per group: min =         6
                                                               avg =      16.2
                                                               max =        41

                                                LR chi2(12)        =     21.54
Log likelihood  = -94.765621                    Prob > chi2        =    0.0431

------------------------------------------------------------------------------
       xest2 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Iyear_~1999 |   .7705376   .5887671     1.31   0.191    -.3834246      1.9245
_Iyear_~2000 |   .0804127   .5377096     0.15   0.881    -.9734788    1.134304
    lmis_per |   .1431241   .1035589     1.38   0.167    -.0598477    .3460958
       small |  -.6050289   .4629784    -1.31   0.191     -1.51245    .3023921
       diff3 |    .622433   .3797323     1.64   0.101    -.1218286    1.366695
_Iclient_c~2 |  -2.113278   1.297228    -1.63   0.103    -4.655798    .4292424
_Iclient_c~3 |  -.2535826    .649904    -0.39   0.696    -1.527371    1.020206
_Iclient_c~4 |   .0658344   .7872134     0.08   0.933    -1.477076    1.608744
 _Iproduct_3 |   .6620156   .4768083     1.39   0.165    -.2725115    1.596543
 _Iproduct_5 |  -.2281419   .5510209    -0.41   0.679    -1.308123    .8518393
 _Iproduct_6 |   .7829757   .6403594     1.22   0.221    -.4721057    2.038057
 _Iproduct_7 |   .0597629   .9041543     0.07   0.947    -1.712347    1.831873
------------------------------------------------------------------------------

. est store fixed

. xi:logit xest2 i.year_val lmis_per small diff3 i.client_cat i.product if e(sample)
i.year_val        _Iyear_val_1995-2004(naturally coded; _Iyear_val_1995 omitted)
i.client_cat      _Iclient_ca_1-4     (naturally coded; _Iclient_ca_1 omitted)
i.product         _Iproduct_1-7       (naturally coded; _Iproduct_1 omitted)

Iteration 0:   log likelihood = -134.42931
Iteration 1:   log likelihood = -121.44682
Iteration 2:   log likelihood = -121.24036
Iteration 3:   log likelihood = -121.23977
Iteration 4:   log likelihood = -121.23977

Logistic regression                               Number of obs   =        194
                                                  LR chi2(12)     =      26.38
                                                  Prob > chi2     =     0.0095
Log likelihood = -121.23977                       Pseudo R2       =     0.0981

------------------------------------------------------------------------------
       xest2 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Iyear_~1999 |   .7388409   .5108352     1.45   0.148    -.2623778    1.740059
_Iyear_~2000 |  -.0084935   .4215546    -0.02   0.984    -.8347253    .8177384
    lmis_per |   .1913278   .0814752     2.35   0.019     .0316393    .3510163
       small |  -.3147586   .4116586    -0.76   0.445    -1.121595    .4920774
       diff3 |   .3532745   .3432509     1.03   0.303    -.3194849    1.026034
_Iclient_c~2 |  -2.458576   1.211284    -2.03   0.042     -4.83265   -.0845026
_Iclient_c~3 |  -.0676932   .4828449    -0.14   0.889    -1.014052    .8786653
_Iclient_c~4 |  -.0977617   .5403883    -0.18   0.856    -1.156903      .96138
 _Iproduct_3 |   .4145465   .4540468     0.91   0.361    -.4753688    1.304462
 _Iproduct_5 |  -.3205893   .5280656    -0.61   0.544    -1.355579    .7144003
 _Iproduct_6 |   .5438465   .6083991     0.89   0.371    -.6485937    1.736287
 _Iproduct_7 |  -.1268551   .8296969    -0.15   0.878    -1.753031    1.499321
       _cons |  -1.761016   .5969357    -2.95   0.003    -2.930988   -.5910432
------------------------------------------------------------------------------

. hausman fixed
no coefficients in common; specify equations(matchlist)
for problems with different equation names.
r(498);



>>> stillman@motu.org.nz 11/17 9:11 PM >>>
a hausman test (see hausman) can be used since OLS is efficient if the fixed effects are zero but biased if they are not and FE logit is consistent in either case.  However, be aware that the FE logit model is only run on observations that have a change in the outcome variable over the panel dimension.  You will want to the run the simple logit on just this sub-sample for the hausman test.  

the approach you propose will not give you a correct results because unless you have more observations in the panel dimension (ie year) than number of panels (ie individuals) just adding dummy variables will result in biased estimates because of the incidental parameters problem.

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu 
[mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of Ali Karim
Sent: Friday, November 18, 2005 12:44 PM
To: statalist@hsphsun2.harvard.edu 
Subject: st: fixed effect logit vs naive logit


Dear subscribers:
I was wondering if there is any way I can test whether the fixed-effects logit model is a better fit than the na´ve logit model.

for example:
xtlogit outcome age sex race,i(id) fe
vs.
logit outcome age sex race

The only way I figured to do this is to run a logit model with dummies for id, then run the test for all the dummies jointly equals zero.

Thanks in advance.

Ali


Ali Mehryar Karim 
Senior Quantitative Analyst
DELIVER/John Snow, Inc. (JSI)
1616 N Fort Myer Dr, 11th Floor
Arlington, VA 22209
ph: 703-528-7474; fx: 703-528-7480
visit the DELIVER website: deliver.jsi.com

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html 
*   http://www.stata.com/support/statalist/faq 
*   http://www.ats.ucla.edu/stat/stata/ 


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html 
*   http://www.stata.com/support/statalist/faq 
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index