Description Usage Arguments Details Value References See Also Examples
Computes the weighted Kaplan-Meier estimate over some time points with optional confidence intervals.
1 |
x |
A list of |
lb,ub |
Lower and upper bounds of the integral of the MAMSE criterion. |
time |
A vector of times at which to compute the Kaplan-Meier estimate. |
boot |
When NULL, bootstrap confidence intervals are not generated. Otherwise must be a number in (0,1) corresponding to the coverage probability of the bootstrap intervals to be built. |
REP |
When bootstrap is used, controls the number of pseudo-sample to generate. |
This function calculates the weighted Kaplan-Meier estimate and can provide pointwise bootstrap confidence intervals.
List of elements:
x |
Sorted list of the times (observed and censored) from each samples |
weight |
The size of the jump that the Kaplan-Meier estimate allocates to each
time in |
time |
Vector of time points where the function is evaluated. |
kme |
The Kaplan-Meier estimate for Population 1 evaluated at |
kmeCI |
Pointwise bootstrap confidence interval for |
wkme |
The weighted Kaplan-Meier estimate evaluated at |
wkmeCI |
Pointwise bootstrap confidence interval for |
J.-F. Plante (2007). Adaptive Likelihood Weights and Mixtures of Empirical Distributions. Unpublished doctoral dissertation, University of British Columbia.
J.-F. Plante (2009). About an adaptively weighted Kaplan-Meier estimate. Lifetime Data Analysis, 15, 295-315.
MAMSE-package, WKME.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | set.seed(2009)
x=list(
cbind(rexp(20),sample(c(0,1),20,replace=TRUE)),
cbind(rexp(50),sample(c(0,1),50,replace=TRUE)),
cbind(rexp(100),sample(c(0,1),100,replace=TRUE))
)
allx=pmin(1,c(x[[1]][x[[1]][,2]==1,1],x[[2]][x[[2]][,2]==1,1],
x[[3]][x[[3]][,2]==1,1]))
K=WKME(x,1,time=sort(unique(c(0,1,allx,allx-.0001))),boot=.9,REP=100)
# Only 100 bootstrap repetitions were used to get a fast enough
# calculation on a CRAN check.
plot(K$time,K$wkme,type='l',col="blue",xlab="x",
ylab="P(X<=x)",ylim=c(0,1))
lines(K$time,K$kme[,1],col="red")
lines(K$time,K$wkmeCI[1,],lty=2,col="blue")
lines(K$time,K$wkmeCI[2,],lty=2,col="blue")
lines(K$time,K$kmeCI[1,],lty=2,col="red")
lines(K$time,K$kmeCI[2,],lty=2,col="red")
legend(.1,.9,c("Weighted Kaplan-Meier","Kaplan-Meier"),
col=c("blue","red"),lty=c(1,1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.