[Rd] bug in extractAIC.survreg (PR#6909)

ramsey at landcareresearch.co.nz ramsey at landcareresearch.co.nz
Mon May 24 05:00:05 CEST 2004

Full_Name: Dave Ramsey
Version: 1.8.0
OS: win2000
Submission from: (NULL) (

there is a bug in extractAIC.survreg in library MASS.

A survreg model object has no component called "residuals".  Hence  

n <- length(fit$residuals)

returns 0 resulting in errors 

workaround:   replace 

n <- length(fit$residuals)


n <- length(residuals(fit))

More information about the R-devel mailing list