From Torsten.Hothorn at rzmail.uni-erlangen.de  Wed Oct  6 19:22:46 2004
From: Torsten.Hothorn at rzmail.uni-erlangen.de (Torsten Hothorn)
Date: Wed Oct  6 19:23:14 2004
Subject: [Rd] R2.0.0 bug in function vcov in library survival (PR#7266)
In-Reply-To: <20041006160456.19459EABC@slim.kubism.ku.dk>
References: <20041006160456.19459EABC@slim.kubism.ku.dk>
Message-ID: <Pine.LNX.4.51.0410061921300.24779@artemis.imbe.med.uni-erlangen.de>

>
> Have just compiled and installed R-2.0.0.tar.gz running SuSE9.0.
>
> The function vcov do not accept "coxph" object as input any longer.
>
> The same R-program running R1.9.1 do work. R-program attached below.
>
> Exporting the coxph object from R2.0.0 to R1.9.1 I get vcov ouput in R1.9.1.
> Exporting the coxph object from R1.9.1 to R2.0.0 I get errors in R2.0.0
>
> =========== Copy of the R-program =======================
> R : Copyright 2004, The R Foundation for Statistical Computing
> Version 2.0.0  (2004-10-04), ISBN 3-900051-07-0
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for a HTML browser interface to help.
> Type 'q()' to quit R.
>
> [Previously saved workspace restored]
>
> > rm(list=ls())
> > load("~/R/wlh0301/data/breast.RData")
> > library(survival)
> Loading required package: splines
> > u2<-coxph(Surv(time,event) ~ age + cbmi + smoker + drink , data=breast.1)
> > tmp <- vcov(u2)
> Error in vcov(u2) : no applicable method for "vcov"
> >
> > class(u2)
> [1] "coxph"
>

S3method(vcov, coxph)

is missing from the NAMESPACE file of package `survival', I think. For the
meantime you may use

R> survival:::vcov.coxph
function (object, ...)
{
    rval <- object$var
    dimnames(rval) <- list(names(coef(object)), names(coef(object)))
    rval
}
<environment: namespace:survival>

Torsten


> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>


[Rd] R2.0.0 bug in function vcov in library survival (PR#7266)
Torsten Hothorn