SimulationReport: Generation of a Word-based summary of MCPMod simulation...

Description Usage Arguments Author(s) See Also Examples

View source: R/supportive.r

Description

This function creates a detailed summary of MCPMod simulation results in a Microsoft Word format.

Usage

1
SimulationReport(results, report_title, report_filename)

Arguments

results

Object of class MCPModSimulationResults created by the MCPModSimulation function.

report_title

Character value defining the report's title.

report_filename

Character value defining the report's filename. The report is saved in the current working directory.

Author(s)

Alex Dmitrienko <admitrienko@medianainc.com>

See Also

MCPModSimulation, AnalysisReport

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
    
# Simulation-based evaluation of dose-finding trials with a binary endpoint

# Endpoint type
endpoint_type = "Binary"

# 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 = 0.3

# Select the assumed dose-response model and values of the non-linear model parameters
sim_models = list(linear = NA, 
                  placebo_effect = 0.2, 
                  max_effect = seq(from = 0, to = 0.5, by = 0.1))

# Simulation parameters 
sim_parameters = list(n = rep(40, 5),
                      doses = c(0, 0.05, 0.2, 0.6, 1),
                      dropout_rate = 0.05,
                      nsims = 1000,
                      go_threshold = 0.3)

# Perform an MCPMod-based simulation
results = MCPModSimulation(endpoint_type = endpoint_type, 
                           models = models, 
                           alpha = alpha, 
                           direction = direction, 
                           model_selection = model_selection, 
                           Delta = Delta,
                           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 (Binary endpoint)", 
  tempfile("MCPMod simulation summary (Binary endpoint).docx", fileext=".docx")) 
  

MCPModPack documentation built on Jan. 13, 2021, 6:37 p.m.