Multiple biases (confounding(), selection(), and/or misclassification()) can be assessed simultaneously after creating a multi_bias object using this function.

multi_bias(..., verbose = TRUE)

Arguments

...

Biases (confounding(), selection(), and/or misclassification()), each possibly including arguments specifying more detail about the bias of interest. Selection and confounding should be listed in the order in which they affect the data (see ordering of the biases)

verbose

Logical. If TRUE, returns warnings and messages immediately. Defaults to TRUE.

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

biases <- multi_bias(confounding(), selection("general")) # print() lists the arguments for the multi_bound() function print(biases)
#> The following arguments can be copied and pasted into the multi_bound() #> function: RRAUc = , RRUcY = , RRUsYA1 = , RRSUsA1 = , RRUsYA0 = , #> RRSUsA0 =
# summary() provides more information # with parameters in latex notation if latex = TRUE summary(biases, latex = TRUE)
#> bias output argument latex #> 1 confounding RR_AUc RRAUc $\\text{RR}_{AU_c}$ #> 2 confounding RR_UcY RRUcY $\\text{RR}_{U_cY}$ #> 3 selection RR_UsY|A=1 RRUsYA1 $\\text{RR}_{U_sY \\mid A = 1}$ #> 4 selection RR_SUs|A=1 RRSUsA1 $\\text{RR}_{SU_s \\mid A = 1}$ #> 5 selection RR_UsY|A=0 RRUsYA0 $\\text{RR}_{U_sY \\mid A = 0}$ #> 6 selection RR_SUs|A=0 RRSUsA0 $\\text{RR}_{SU_s \\mid A = 0}$
# Calculate a bound multi_bound(biases = biases, RRAUc = 1.5, RRUcY = 2, RRUsYA1 = 1.25, RRSUsA1 = 4, RRUsYA0 = 3, RRSUsA0 = 2)
#> [1] 2.117647