Skip to contents

Sets the arguments prior_t and prior_c of a design specification started by qdm_endpoint. They 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_prior(x, prior_t = ...) also removes prior_c of x.

Usage

qdm_prior(x, prior_t, prior_c = NULL)

Arguments

x

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

prior_t, prior_c

Prior distributions of the treatment and control groups, created by the prior_*() function of the endpoint (see design_binary, design_continuous, design_binary2, design_continuous2 and design_tte). prior_c is NULL (the default) for a fixed control, and for a hypothetical control of one or two continuous endpoints.

Value

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

Examples

qdm_endpoint("binary") |>
  qdm_prior(prior_t = prior_beta(0.5, 0.5),
            prior_c = prior_beta(0.5, 0.5))
#> Design specification: one binary endpoint (incomplete)
#>   Arguments set: prior_t, prior_c
#>   Still needed: the sample sizes (qdm_sample_size()), the decision criterion (qdm_criterion())