Event {Mediana} | R Documentation |
Event object
Description
This function creates an object of class Event
which can be added to an object of class DataModel
.
Usage
Event(n.events, rando.ratio = NULL)
Arguments
n.events |
defines a vector of number of events required. |
rando.ratio |
defines a vector of randomization ratios for each |
Details
This function can be used if the number of events needs to be fixed in an event-driven clinical trial. Either objects of class Event
or SampleSize
can be added to an object of class DataModel
but not both.
References
http://gpaux.github.io/Mediana/
See Also
See Also DataModel
.
Examples
# In this case study, the radomization ratio is 2:1 (Treatment:Placebo).
# Sample size parameters
event.count.total = c(390, 420)
randomization.ratio = c(1,2)
# Outcome parameters
median.time.placebo = 6
rate.placebo = log(2)/median.time.placebo
outcome.placebo = list(rate = rate.placebo)
median.time.treatment = 9
rate.treatment = log(2)/median.time.treatment
outcome.treatment = list(rate = rate.treatment)
# Dropout parameters
dropout.par = parameters(rate = 0.0115)
# Data model
data.model = DataModel() +
OutcomeDist(outcome.dist = "ExpoDist") +
Event(n.events = event.count.total, rando.ratio = randomization.ratio) +
Design(enroll.period = 9,
study.duration = 21,
enroll.dist = "UniformDist",
dropout.dist = "ExpoDist",
dropout.dist.par = dropout.par) +
Sample(id = "Placebo",
outcome.par = parameters(outcome.placebo)) +
Sample(id = "Treatment",
outcome.par = parameters(outcome.treatment))
[Package Mediana version 1.0.8 Index]