Skip to contents

Sets 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.

Usage

qdm_control(x, hypothetical_c = NULL, fixed_c = NULL)

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, or NULL.

fixed_c

Fixed value of the control parameter, or NULL. Its meaning depends on the endpoint (see design_binary, design_continuous, design_binary2, design_continuous2 and design_tte).

Value

A design specification: x, or the specification of the design x, with the control set.

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