# \donttest{
# Simulation-based evaluation of dose-finding trials with a count endpoint
# Endpoint type
endpoint_type = "Count"
# Select the candidate dose-response models and initial values
# of the non-linear model parameters (linear, quadratic, exponential,
# emax, logistic and sigemax)
models = list(linear = NA,
quadratic = -0.5,
exponential = 0.3,
emax = 0.3,
logistic = c(0.5, 0.1),
sigemax = c(0.5, 5))
# One-sided Type I error rate
alpha = 0.025
# Direction of the dose-response relationship
direction = "increasing"
# Model selection criterion
model_selection = "AIC"
# The treatment effect for identifying the target dose
# (this effect is defined relative to the placebo effect)
Delta = 2
# Vector of overdispersion parameters
theta = c(2, 2, 2, 2, 2)
# Select the assumed dose-response model and values of the non-linear model parameters
sim_models = list(emax = 1,
placebo_effect = 3,
max_effect = seq(from = 0, to = 3, by = 1))
# Simulation parameters
# (go threshold is defined relative to the placebo effect)
sim_parameters = list(n = c(50, 50, 50, 50, 50),
doses = c(0, 0.05, 0.2, 0.6, 1),
dropout_rate = 0.05,
nsims = 1000,
go_threshold = 2)
# Perform an MCPMod-based simulation
results = MCPModSimulation(endpoint_type = endpoint_type,
models = models,
alpha = alpha,
direction = direction,
model_selection = model_selection,
Delta = Delta,
theta = theta,
sim_models = sim_models,
sim_parameters = sim_parameters)
# Simple summary of the MCPMod simulation results
results
# Detailed summary of the MCPMod simulation results (remove tempfile)
SimulationReport(results,
"MCPMod simulation summary (Count endpoint)",
tempfile("MCPMod simulation summary (Count endpoint).docx", fileext=".docx"))
# }
Run the code above in your browser using DataLab