[R] Stratified Survival Estimates
edwardeb at unos.org
Wed Aug 11 18:30:35 CEST 2004
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).
fit<-survfit(S ~ V4,data=test.dat)
summary(fit) produces the following error message:
Call: survfit(formula = S ~ V4)
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
More information about the R-help