You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"a power prior (discount a₀ = %.0f%%) incorporating %s/%s historical responders and a baseline Beta prior (%.1f, %.1f)",
63
-
100* prior_args()$a0,
64
-
fmt_int(prior_args()$y_0),
65
-
fmt_int(prior_args()$n_0),
66
-
prior_args()$a_base %||% 1,
67
-
prior_args()$b_base %||% 1
68
-
)
60
+
"flat"="a non-informative flat prior for the response rate in each arm",
61
+
"power"= {
62
+
eff_n0<- prior_args()$a0* prior_args()$n_0
63
+
sprintf(
64
+
"a power prior incorporating %s/%s historical responders. The historical data is down-weighted using a factor of %.0f%%, resulting in an effective contribution equivalent to %.1f patients",
65
+
fmt_int(prior_args()$y_0),
66
+
fmt_int(prior_args()$n_0),
67
+
100* prior_args()$a0,
68
+
eff_n0
69
+
)
70
+
}
69
71
)
70
72
71
-
# 5. Decision logic
72
-
decision_txt<-if (decision_mode() =="gamma") {
73
-
sprintf("The trial is declared successful if the posterior probability that the true treatment effect exceeds Δ is at least γ = %s.", fmt_pct(gamma()))
74
-
} else {
75
-
sprintf("γ is calibrated to achieve a target Type-I error of %s.", fmt_pct(alpha()))
76
-
}
77
-
78
73
# 6. Final narrative
79
74
HTML(sprintf(
80
75
"<p>%s</p>
81
-
<p>%s</p>
82
76
<p>%s</p>
83
77
<p>The analysis uses %s.</p>
84
78
<p>Posterior probabilities are computed using %s draws per simulated trial, across %s simulated trials.</p>
0 commit comments