[R] extractAIC.survreg problem with df

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Apr 21 17:46:40 CEST 2004


There has been a change in the survreg function since that was written 
....

On Wed, 21 Apr 2004, Stefano Calza wrote:

> Hi everybody.
> 
> I'm having problems with the extractAIC.survreg function and the edf
> 
> I get weird results which I think are due to the fact that the function defines edf as (from the stats package in 1.9.0 source code)
> 
> ...
> ...
> n <- length(fit$residuals)
> edf <- n-fit$df.residual
> ...
> 
> But in a survreg object there's no attribute residuals!!??
> 
> if in the function I use instead
> 
> ...
> n <- length(residuals(fit)
> ...
> 
> everything's fine, or better
> 
> ...
> edf <- fit$df
> ...
> 
> Am I missing something?
> 
> TIA,
> Stefano
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list