Using R version 1.8.1 for Windows, I obtain an error message using the following code.
The data frame was constructed in the counting process style, where V1 is the start
time, V2 is the stop time, and V3 is the censoring indicator. There are no
zero-length time intervals. Variable V4 is the stratification factor (gender: F,M).
S<-Surv(V1,V2,V3)
fit<-survfit(S ~ V4,data=test.dat)
summary(fit) produces the following error message:
Call: survfit(formula = S ~ V4)
V4=F
Error in as.matrix(x) : (subscript) logical subscript too long
Using no stratification factor in the survfit function, I get no error using summary.
I need to be able to write the survival curve for each stratum to a an external file.
Any help appreciated.
Erick B. Edwards
______________________________________________
[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