
Set a hypothetical or fixed control of a design specification
Source:R/qdm_control.R
qdm_control.RdSets the arguments hypothetical_c and fixed_c of a design
specification started by qdm_endpoint, for a study without
a concurrent control group (n_c = 0, see
qdm_sample_size). A concurrent control group and external
control data only (see qdm_external) need no call of this
function. The arguments are checked when the design is built, by the
design_*() function of the endpoint. All the arguments of the step
are set together: an argument that is not given returns to the default, so
a hypothetical control replaces a fixed control and the other way round.
Arguments
- x
A design specification started by
qdm_endpoint, or a design, which is converted to the specification that builds it.- hypothetical_c
Hypothetical control, created by
hypothetical, orNULL.- fixed_c
Fixed value of the control parameter, or
NULL. Its meaning depends on the endpoint (seedesign_binary,design_continuous,design_binary2,design_continuous2anddesign_tte).
See also
Other design steps:
qdm_build(),
qdm_computation(),
qdm_criterion(),
qdm_endpoint(),
qdm_external(),
qdm_prior(),
qdm_sample_size(),
qdm_tte()
Examples
# Single-arm study compared with a fixed control response rate of 0.2
qdm_endpoint("binary") |>
qdm_sample_size(n_t = 20, n_c = 0) |>
qdm_prior(prior_t = prior_beta(1, 1)) |>
qdm_criterion(criterion_posterior(theta_tv = 0.2, theta_mav = 0.05,
gamma_go = 0.8, gamma_nogo = 0.8)) |>
qdm_control(fixed_c = 0.2)
#> Design specification (complete):
#> Design: one binary endpoint
#> Treatment: n = 20, prior Beta(a = 1, b = 1)
#> Control: fixed value 0.2
#> Posterior probability criterion
#> Go: P(theta > 0.2 | data) >= 0.8
#> NoGo: P(theta <= 0.05 | data) >= 0.8