# List of all parameters
parameters = list()
# Endpoint type
parameters$endpoint_type = "Normal"
# Number of enrolled patients (control, two treatments)
parameters$sample_size = c(100, 100, 100)
# Direction of favorable outcome
parameters$direction = "Higher"
# Patient dropout rate
parameters$dropout_rate = 0.05
# Mean and SD in the control arm
parameters$control_mean = 0
parameters$control_sd = 1
# Means and SDs in the treatment arms
parameters$treatment_mean = c(0.25, 0.30)
parameters$treatment_sd = c(1, 1)
# Information fraction
parameters$info_frac = 0.5
# One-sided alpha level
parameters$alpha = 0.025
# Number of simulations, you should prefer more
parameters$nsims = 100
# Number of cores for parallel calculations
parameters$ncores = 1
# Remove this parameter in your code:
parameters$withoutCharts = TRUE
# Run simulations to compute characteristics of the futility stopping rule
results = FutRule(parameters)
# Generate a simulation report (remove tempfile)
GenerateReport(results,
tempfile("FutRule Normally distributed endpoint.docx", fileext=".docx"))
Run the code above in your browser using DataLab