A type of bias. Declares that selection bias will be a component of interest in the multi-bias sensitivity analysis. Generally used within other functions; its output is returned invisibly.

selection(..., verbose = FALSE)

Arguments

...

Optional arguments describing the type of potential selection bias. Options are "general" (general selection bias, the default if no options are chosen), "increased_risk" and "decreased_risk" (assumptions about the direction of risk in the selected population), "S = U" (simplification used if the biasing characteristic is common to the entire selected population), and "selected" (when the target of inference is the selected population only). Errors are produced when incompatible assumptions are chosen.

verbose

Logical. If TRUE, returns warnings and messages immediately. Defaults to FALSE because it is generally used within the multi_bias() function, which will print the same messages/warnings.

Value

Invisibly returns a list with components whose values depend on the options chosen: n (the degree of the polynomial in the numerator), d (the degree of the polynomial in the denominator),mess (any messages/warnings that should be printed for the user), and bias("selection"), as well as

Examples

# returns invisibly without print() print(selection("general", "increased risk"))
#> [1] "selection"
# Calculate an E-value for selection bias only multi_evalue(est = RR(4), biases = selection("general", "increased risk"))
#> This multi-bias e-value refers simultaneously to parameters RR_UsY|A=1, #> RR_SUs|A=1 . (See documentation for details.)
#> point lower upper #> RR 4.000000 NA NA #> Multi-bias E-values 7.464102 NA NA