Lei Liu wrote:
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"
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
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)
[EMAIL PROTECTED] [EMAIL PROTECTED]
______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html