I'm having a hard time fathoming your question, since "pterms" appears nowhere in my source code to residuals.survreg. Can we start at the beginning, per the posting guide?
1. What version of R are you running? 2. What exactly are the statements you typed which give the message? Note that residuals are not saved in a fit, but are computed later. fit <- survreg(Surv(time, status) ~ age + height, data=mydata) resid(fit, type='response') Terry Therneau --- begin included message -------- Residual and predict methods are not carried out on the survreg object, although the component linear.predictors exists for the survreg object. Looking at the code I see that the residual method refuses to run if any of the components of the pterms vector is equal to 2. --- end inclusion --- ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.