Displaying 2 results from an estimated 2 matches for "msurv".
Did you mean:
surv
2004 Jun 07
1
Censboot Warning and Error Messages
...<- 50
>
> ## Calculate median survival time; standard error and bias using the Ordinary
Bootstrap
>
> data.fun <- function(data) {
+ surv <- survfit(Surv(data$time, data$cens))
+ md <- min(surv$time[surv$surv<0.5])
+ }
> set.seed(1234)#set the random start
> msurv.ord <- censboot(data=filename, statistic=data.fun,R=r)
> msurv.ord#median survival time using ordinary bootstrap
CASE RESAMPLING BOOTSTRAP FOR CENSORED DATA
Call:
censboot(data = filename, statistic = data.fun, R = r)
Bootstrap Statistics :
original bias std. error
t1* 27...
2004 Apr 21
1
Boot package
...the given code that results in "Inf" and
"NaN" result. I tried a different data, analyzing it without stratification.
I got a different error:
> data.s1 <- survfit(Surv(time,cens), data=dataset)
> data.s2 <- survfit(Surv(time-0.001*cens,1-cens), data=dataset)
> msurv.cond <- censboot(data=dataset,statistic=data.fun,R=r,
F.surv=data.s1,G.surv=data.s2,sim="cond")
Error in sample(length(x), size, replace, prob) :
invalid first argument
Can the boot package also output standard error and bias of the regression
coefficients if I do a cox prop...