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..) regards, vito library(survival)> o<- coxph( Surv(time, status) ~ x + strata(sex), test1) #example from?coxph> vcov(o) #of course I could use o$varError 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
"Vito Muggeo" <vito.muggeo at giustizia.it> writes:> 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..)It's a bug in the NAMESPACE file for survival:> survival:::vcov.coxph(o)x x 1.660006 or> vcov.coxph <- survival:::vcov.coxph > vcov(o)x x 1.660006 So the only thing you're missing is example(coxph) in your example. Without that, test1 is not found.> > 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"It has been reported before, and I think it is fixed in the current patch version. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
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