Skip to contents

Format a decision

Usage

# S3 method for class 'qdm_decision'
format(x, digits = 4L, ...)

Arguments

x

An object of class "qdm_decision".

digits

Number of significant digits for numeric values.

...

Not used.

Value

A character vector with one element per line of the description.

Examples

des <- design_binary(
  n_t = 12, n_c = 12,
  prior_t = prior_beta(0.5, 0.5), prior_c = prior_beta(0.5, 0.5),
  criterion = criterion_posterior(theta_tv = 0.2, theta_mav = 0.1,
                                  gamma_go = 0.5, gamma_nogo = 0.8)
)
format(qdm_decide(des, data_binary(12, 9), data_binary(12, 4)))
#> [1] "Decision: Go"                                                     
#> [2] "  Go:   P(theta > 0.2 | data) = 0.8517 (threshold 0.5, met)"      
#> [3] "  NoGo: P(theta <= 0.1 | data) = 0.05935 (threshold 0.8, not met)"
#> [4] "Posterior distributions"                                          
#> [5] "  Treatment: Beta(a = 9.5, b = 3.5)"                              
#> [6] "  Control:   Beta(a = 4.5, b = 8.5)"