Skip to contents

Sets the arguments external_t and external_c of a design specification started by qdm_endpoint: external data of the treatment and control groups, borrowed through a power prior. With n_c = 0 (see qdm_sample_size) and external control data, the control group is the external control data only. 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 qdm_external(x, external_c = ...) also removes the external data of the treatment group of x.

Usage

qdm_external(x, external_t = NULL, external_c = NULL)

Arguments

x

A design specification started by qdm_endpoint, or a design, which is converted to the specification that builds it.

external_t, external_c

External data of the treatment and control groups, created by borrow with the data_*() function of the endpoint, or NULL (no external data).

Value

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

Examples

qdm_endpoint("binary") |>
  qdm_external(external_c = borrow(data_binary(n = 20, y = 8), a0 = 0.5))
#> Design specification: one binary endpoint (incomplete)
#>   Arguments set: external_c
#>   Still needed: the sample sizes (qdm_sample_size()), the prior distributions (qdm_prior()), the decision criterion (qdm_criterion())