[R] vcov method for 'coxph' objects

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Oct 26 17:40:13 CEST 2004


On Tue, 26 Oct 2004, Vito Muggeo wrote:

> Dear all,
> The help file for the generic function vcov states
> 
> "Classes with methods for this function include: 'lm', 'glm', 'nls', 'lme',
> 'gls', 'coxph' and 'survreg' (the last two in package 'survival')."
> 
> Since, I am not able to use vcov.coxph(), I am wondering whether I am
> missing something (as I suspect..)

On some versions of survival it is there but not exported. In that case 
you need

vcov.coxph <- survival:::vcov.coxph

> 
> regards,
> vito
> 
> library(survival)
> > o<- coxph( Surv(time, status) ~ x + strata(sex), test1)  #example from
> ?coxph
> > vcov(o)  #of course I could use o$var
> Error in vcov(o) : no applicable method for "vcov"
> > R.version
>          _
> platform i386-pc-mingw32
> arch     i386
> os       mingw32
> system   i386, mingw32
> status
> major    2
> minor    0.0
> year     2004
> month    10
> day      04
> language R
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.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