combo.wlr: Weighted Logrank Combo Test and Estimation

Description Usage Arguments Details Value Examples

View source: R/combo.wlr.r

Description

Description

Usage

1
combo.wlr(survival, cnsr, trt, stra = NULL, fparam)

Arguments

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. Currently is set to NULL.

fparam

a list input for additional function call arguments

fparam$rgs

required: a list of rho gamma pair in the form of list(c(rho1, gamma1), c(rho2, gamma2), etc...)

fparam$draw

Number of resampling

Details

Details are provided here

Value

The function return a list with the follow components

pval

One-sided p-Value corresponding to Zmax

rho, gamma

rho and gamma corresponding to Zmax

Zmax

Zmax

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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)
               
rgs <- list(c(0, 0), c(0, 1), c(0, 2), c(0, 3), c(1, 0), c(2, 0), c(2, 2))    
draws <- 10        
test1<-simtest(x=sim1,anaD=c(250),method=combo.wlr,fparam=list(rgs=rgs,draws=draws))
test1$result[]

# direct function call (without cutoff)
combo.wlr(survival=sim1$simd$survival, cnsr=sim1$simd$cnsr, trt=sim1$simd$treatment,
          fparam=list(rgs=rgs,draws=draws))

keaven/nphsim documentation built on May 24, 2020, 9:34 p.m.