Description Usage Arguments Details Value Examples
RMST method with user specified trucation time.
1 |
survival |
time-to-event variable |
cnsr |
censoring variable: 1=censoring, 0=event |
trt |
treatment varaible. Accepted values are either "experiment" or "control" |
stra |
stratification variable. Default is |
fparam |
the cutoff time for RMST analysis. If larger than the minimum of the largest observed time on each of the two arms, the minimum value will be used. |
Restricted mean survival test at specified cutoff time. This is adopted from rmst2
.
The function return a list with the follow components
One-sided p-Value from RMST comparing treatment arm to control arm
time cutoff used for each analysis
Estimated difference between treatment and control arm
Lower and upper bound of the estimated difference
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # RMST on the simulated data
library(survRM2)
medC = 6
hr <- 0.7
intervals <- NULL
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=1,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=rmst.Stat,fparam=12)
test1$result[]
# direct function call (without cutoff)
rmst.Stat(surv=sim1$simd$survival, cnsr=sim1$simd$cnsr, trt=sim1$simd$treatment,fparam=12)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.