I attempted to check the AIC of my aftreg fitted object, and it did not work because logLik is not defined for aftreg. I looked up your source code in logLik.R and I think this issue can be fixed by adding the same code as you have in logLik.phreg. Something like this:
logLik.aftreg <- function(object, ...){
out <- object$loglik[2]
dd <- diag(object$var)
attr(out, "df") <- sum(!is.na(dd) & dd > 0) #Stolen from logLik.survreg
class(out) <- "logLik"
out
}
Hi there,
I attempted to check the AIC of my aftreg fitted object, and it did not work because logLik is not defined for aftreg. I looked up your source code in logLik.R and I think this issue can be fixed by adding the same code as you have in logLik.phreg. Something like this:
Cheers, Simon