Skip to content
Prev 12671 / 63461 Next

bug in extractAIC.survreg (PR#6909)

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


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)

with

n <- length(residuals(fit))