# NOT RUN {
require(survival)
data(SurvMarkers)
SurvMarkers$surv <- Surv(SurvMarkers$time, SurvMarkers$event)
## Using a composite biomarker (combining x1 and x2) to plan a trial
## with an accrual period of 12 months and a follow-up period of 36 months.
## The cost for keeping a patient in the trial is $300/month.
## We wish to detect a hazard ratio of 0.8 with a two-sided test,
## with type I error 0.05 and power 0.9.
## The Kaplan-Meier method is used to calculate event probabilities.
rslt <- surv_enrichment(formula = surv~x1+x2, data = SurvMarkers, hr = 0.8, a=12, f=36,
cost.screening = 300, cost.keeping = NULL, cost.unit.keeping = 300,
method = "KM", power = 0.9, alpha = 0.05, one.sided = FALSE,
selected.biomarker.quantiles = seq(from = 0, to = 0.9, by = 0.1),
do.bootstrap = FALSE, print.summary.tables = FALSE)
# }
Run the code above in your browser using DataLab