Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Strange behavior from conditional logistic - bug?


From   jpitblado@stata.com (Jeff Pitblado, StataCorp LP)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Strange behavior from conditional logistic - bug?
Date   Fri, 26 Oct 2007 13:26:38 -0500

Ricardo Ovaldia <ovaldia@yahoo.com> is using -clogit- but it exited with the
error 'Hessian has become unstable or asymmetric' while working on the first
iteraction.  He asks why there are -e()- results present when -clogit- exited
with an error.

-clogit- uses -logit- to compute initial values before calling -ml- to fit the
model.  The -e()- results Ricardo noticed are from this call to -logit-.

--Jeff
jpitblado@stata.com

-----------------------------------------------------------------------------
Original message from Ricardo Ovaldia <ovaldia@yahoo.com>:

> I am not sure what is going on here, but this does not
> look correct. My conditional logistic regression fails
> with a "Hessian has become unstable or asymmetric"
> error message, however the return list and the
> coefficient matrices are populated:
> 
> . use cdata.dta, clear
> . mat drop _all
> . eret clear
> . cap noi mat list e(b)
> matrix e(b) not found
> 
> . clogit case expose, group(race)
> note: multiple positive outcomes within groups
> encountered.
> 
> Iteration 0:   log likelihood = -939.77277  
> Hessian has become unstable or asymmetric
> r(504);
> 
> . mat list e(b)
> 
> e(b)[1,2]
>        expose      _cons
> y1  .04772761  .71262832
> 
> . eret list
> 
> scalars:
>                   e(N) =  1514
>                e(ll_0) =  -954.663128837389
>                  e(ll) =  -954.5735647746089
>                e(df_m) =  1
>                e(chi2) =  .1791281255600552
>                e(r2_p) =  .0000938174525386
>               e(N_cdf) =  0
>               e(N_cds) =  0
> 
> macros:
>             e(cmdline) : "logit __000002 expose if
> __000001 , "
>               e(title) : "Logistic regression"
>                 e(vce) : "oim"
>              e(depvar) : "__000002"
>                 e(cmd) : "logit"
>            e(crittype) : "log likelihood"
>             e(predict) : "logit_p"
>          e(properties) : "b V"
>           e(estat_cmd) : "logit_estat"
>            e(chi2type) : "LR"
> 
> matrices:
>                   e(b) :  1 x 2
>                   e(V) :  2 x 2
>               e(rules) :  1 x 4
> 
> functions:
>              e(sample)   
> 
> 
> The hessian becoming unstable or asymmetric is also
> strange. Race has 3 levels and >60 observations per
> race.

*
*   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