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

misclassification(
  ...,
  rare_outcome = FALSE,
  rare_exposure = FALSE,
  verbose = FALSE
)

Arguments

...

Arguments describing the type of misclassification. Currently two options: "outcome" or "exposure".

rare_outcome

Logical. Is the outcome rare enough that outcome odds ratios approximate risk ratios? Only needed when considering exposure misclassification. Note that rare_outcome = FALSE returns an error, as this option is not currently available.

rare_exposure

Logical. Is the exposure rare enough that exposure odds ratios approximate risk ratios? Only needed when considering exposure misclassification.

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), m (the parameters in the bias factor), mess (any messages/warnings that should be printed for the user), and bias("misclassification").

Examples

# returns invisibly without print() print(misclassification("outcome"))
#> [1] "outcome misclassification"
# Calculate an E-value for misclassification multi_evalue(est = RR(4), biases = misclassification("exposure", rare_outcome = TRUE, rare_exposure = TRUE))
#> This multi-bias e-value refers simultaneously to parameters RR_YA*|a . #> (See documentation for details.)
#> point lower upper #> RR 4 NA NA #> Multi-bias E-values 4 NA NA