Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Event

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 Sample object defined in the DataModel.

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

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))

Mediana

Clinical Trial Simulations

v1.0.8
GPL-2
Authors
Gautier Paux, Alex Dmitrienko.
Initial release
2019-05-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.