[R] Stratified Survival Estimates
tlumley at u.washington.edu
Wed Aug 11 18:53:58 CEST 2004
On Wed, 11 Aug 2004, Erick Edwards wrote:
> Using R version 1.8.1 for Windows, I obtain an error message using the
It would be worth upgrading, though it wouldn't fix this particular
> 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
> I need to be able to write the survival curve for each stratum to a an
> external file.
You should still be able to get the survival curves written out.
fit$time and fit$surv give time and survival for the first stratum,
fit$time and fit$surv for the second stratum.
Thanks for the bug report.
More information about the R-help