Description Usage Arguments Examples
Plots the study state of a given Simon's two-stage design displaying the already enrolled patients and the stopping rules.
1 2 | plot_simon_study_state(sr, enrolledPat = data.frame(ep1 = logical()), r1, n1,
r, n)
|
sr |
dataframe containing the stopping rules for the given Simon's two-stage design defined by two columns named "Enrolled_patients" and "Needed_responses_ep1". This way each row defines when the study has to be stopped for futility. |
enrolledPat |
dataframe defined by a boolean vector in one column named "ep1" indicating which patient had a response. |
r1 |
critical value for the first stage. |
n1 |
sample size for the first stage. |
r |
critical value for the subset endpoint. |
n |
overall sample size. |
1 2 3 4 5 6 7 8 9 | #Calculate a Simon's two-stage design
design <- getSolutions()$Solutions[3,] #minimax-design for the default values.
#Define the stopping rules according to the chosen design
sr <- data.frame(Enrolled_patients = c(design$n1, design$n),
Needed_responses_ep1 = c(design$r1, design$r))
#Simulate 18 random generated outcomes.
enrolledPat <- data.frame(ep1 = rbinom(18,1, design$p1))
#Plot study state
plot_simon_study_state(sr, enrolledPat, design$r1, design$n1, design$r, design$n)
|
Loading required package: Rcpp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.