Skip to content

function 'vcov' for coxph in R 2.0.0

3 messages · Lei Liu, Brian Ripley, Uwe Ligges

#
Hi there,

After I fitted a cox model, I used vcov to obtain the 
variance of the parameter estimate. It worked correctly in 
R 1.9.1. But it failed in R 2.0.0 and the error message is 

Error in vcov(cox.1) : no applicable method for "vcov"

I don't know if it is a bug or there is some update on 
this function. Thanks!

Lei Liu
Assistant Professor
Division of Biostatistics and Epidemiology
Dept. of Health Evaluation Sciences
School of Medicine
University of Virginia

3181 Hospital West Complex
Charlottesville, VA 22908-0717

1-434-982-3364 (o)
1-734-730-1395 (c)

liulei at virginia.edu
ll9f at virginia.edu
#
Your version of survival is out of date: please use update.packages().
On Fri, 19 Nov 2004, Lei Liu wrote:

            
WHY don't you know if there is an update?
#
Lei Liu wrote:

            
Please give us details and read the posting guide.

The first thing we can guess is that you are using function coxph() from 
package "survival". Is this correct?

If yes, the following extended exmaple from ?coxph works perfectly for 
me in R-2.0.1:

test1 <- list(time=  c(4, 3,1,1,2,2,3),
                 status=c(1,NA,1,0,1,1,0),
                 x=     c(0, 2,1,1,1,0,0),
                 sex=   c(0, 0,0,0,1,1,1))
vcov(coxph( Surv(time, status) ~ x + strata(sex), test1))


Uwe Ligges