selection: Selection bias

Description Usage Arguments Value Examples

View source: R/biases.R

Description

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

Usage

1

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.

message

Logical. If TRUE, returns warnings and messages immediately. Defaults to FALSE because it is generally used within the calculate_evalue() or calculate_bound() functions, 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), m (the parameters in the bias factor), mess (any messages/warnings that should be printed for the user), and bias("selection").

Examples

1
2
3
4
5
6
7
selection("selected")
output <- selection("general", "decreased_risk", "S = U")
output

# Calculate an E-value for selection bias
calculate_evalue(RRobs = 4,
         biases = selection("general", "increased_risk"))

louisahsmith/simpleSens documentation built on March 19, 2020, 12:07 a.m.