| generateClinicalTrialData | R Documentation |
The data is generated according to the model specified in the reference below, specifically,
λ(t \mid Y,Z)=λ_0(t) \exp(α Y + β Z + γ Y Z)
generateClinicalTrialData(nRec, nFUp, pi0, pi1, theta, lambda0, blockSize = 10)
nRec |
the number of patients recruited every year. Length(nRec) is the number of years of recruitment |
nFUp |
the number of additional years of followup |
pi0 |
the probability of response under control arm |
pi1 |
the probability of response under treatment arm |
theta |
the three dimensional parameter (α, β, γ) of the joint response/survival model |
lambda0 |
the baseline hazard rate |
blockSize |
the size of the blocks for randomization of the treatment/control; we use block randomization |
Generates data from an exponentail distribution according to the model and adhering to the recruitment goals for each calendar year
A data frame consisting of the following variables.
entryTime |
entry time of the patient into the trial |
responseIndicator |
an indicator of patient being a responder or not |
treatmentIndicator |
an indicator of patient being in treatment arm or control |
timeToEvent |
the time to event or death in the language of the paper |
Mei-Chiung Shih, Balasubramanian Narasimhan, Pei He
Lai, Tze Leung and Lavori, Philip W. and Shih, Mei-Chiung. Sequential Design of Phase II-III Cancer Trials, Statistics in Medicine, Volume 31, issue 18, p.1944-1960, 2012.
trialParameters <- list(minimumNumberOfEvents = 20,
minimumIncreaseInV = 0.2,
numberRecruitedEachYear = c(80, 120, 160, 160),
followupTime = 3,
adminCensoringTime = 7,
interimLookTime = c(1, 2, 3, 5, 7),
type1ErrorForResponse = 0.05,
type2ErrorForResponse = 0.01,
glrBoundarySidedness = "one", # one sided or two-sided
type1Error = 0.05,
type2Error = 0.10,
epsType1 = 1/3,
epsType2 = 1/3)
trueParameters <- list(p0 = 0.3,
p1 = 0.3,
pdiffHyp=0.3,
theta = list(
alpha = 0,
beta = 0,
gamma = 0),
baselineLambda = 0.35,
etaHyp = 0.25)
rngSeed <- 9872831
d <- generateClinicalTrialData(nRec = trialParameters$numberRecruitedEachYear,
nFUp = trialParameters$followupTime,
pi0 = trueParameters$p0,
pi1 = trueParameters$p1,
theta = trueParameters$theta,
lambda0 = trueParameters$baselineLambda)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.