Displaying 1 result from an estimated 1 matches for "ontxfit".
Did you mean:
onexit
2013 Apr 29
3
Comparing two different 'survival' events for the same subject using survdiff?
...ensored)
C = c( 9.80, 0.43, 5.93, 8.43, 6.80, 2.60, 8.93, 8.37, 12.23, 5.83, 13.17, 0.77)
D = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1) # 1 = yes (censored)
myData = data.frame (TimeOnTx = A, StillOnTx = B, TimeToFailure = C, NotFailed = D)
We can do a survival analysis on those individually:
OnTxFit = survfit (Surv ( TimeOnTx, StillOnTx==0 ) ~ 1 , data = myData)
FailedFit = survfit (Surv ( TimeToFailure , NotFailed==0 ) ~ 1 , data = myData)
plot(OnTxFit)
lines(OnTxFit)
But how can I do a survdiff type of comparison between the two? Do I have to restructure the data so that Time's are a...