Skip to content
Prev 106008 / 398506 Next

Calculating AICc using conditional logistic regression

On Tue, 12 Dec 2006, K.Boughey at uea.ac.uk wrote:

            
Review

 	?logLik
 	?coxph.object

and then roll your own logLik.coxph.

Here is one version:

logLik.coxph <-
     function(object,...) {
         y <-  -1 * (object$loglik[1] - object$loglik[2])
         class(y) <- "logLik"
         attr(y,'df')<- sum(!is.na(object$coef))
         y
}

Try it like this:
infert)
'log Lik.' 26.57712 (df=2)
[...]

Charles C. Berry                        (858) 534-2098
                                          Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	         UC San Diego
http://biostat.ucsd.edu/~cberry/         La Jolla, San Diego 92093-0717