Description Usage Arguments Details Value Examples
Weighted logrank adopted from survMisc package
1 |
survival |
time-to-event variable |
cnsr |
censoring variable: 1=censoring, 0=event |
trt |
treatment varaible. Accepted values are either "experimental" or "control" |
stra |
stratification variable for stratified weighted logrank test. Default is |
fparam |
a list input to request additional FH test and time of delayed separation in the simplified APPLE method
|
The one-sided p-Values from the following tests can be obtained based on input from fparam$stdset
and fparam$APPLE
log-rank (part of standard set)
Gehan-Breslow generalized Wilcoxon (part of standard set)
Tarone-Ware (part of standard set)
Peto-Peto's modified survival estimate (part of standard set)
modified Peto-Peto (by Andersen) (part of standard set)
Simplified APPLE method with user specified late separation time
Fleming-Harrington with user specified pairs of rho
and gamma
The function return a list with the follow components
One-sided p-Value from user specified test
One-sided test from various weighted tests
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # weighted logrank on the simulated data
library(survMisc)
medC = 6
hr <- c(1, 0.6)
intervals <- 3
gamma <- c(2.5, 5, 7.5, 10) ## a ramp-up enrollment
R <- c(2 , 2, 2 , 6 ) ## enrollment period: total of 12 months
eta <- -log(0.99) ## 1% monthly dropout rate
sim1 <- nphsim(nsim=2,lambdaC=log(2)/medC,lambdaE=log(2)/medC*hr, ssC=300,ssE=300,
intervals=intervals,gamma=gamma, R=R,eta=eta)
test1 <- simtest(x=sim1, anaD=c(250,300), method=wlr.Stat,fparam=list(rho=c(0,0,1),
gamma=c(0,1,1), wlr='FH(0,1)', APPLE=3))
test1$result[]
# direct function call (without cutoff)
wlr.Stat(surv=sim1$simd$survival, cnsr=sim1$simd$cnsr, trt=sim1$simd$treatment,
fparam=list(rho=c(0,0,1), gamma=c(0,1,1), wlr='FH(0,1)', APPLE=3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.