Epidemiologic studies can suffer from more than one bias.
Bias functions in episensr
can be applied sequentially to quantify bias
resulting from multiple biases.
Following the example in Lash et al., we can use the study by Chien et al.. It is a case-control study looking at the association between antidepressant use and the occurrence of breast cancer. The observed OR was 1.2 [0.9--1.6].
chien <- matrix(c(118, 832, 103, 884), dimnames = list(c("BC+", "BC-"), c("AD+", "AD-")), nrow = 2, byrow = TRUE)
knitr::kable(chien)
Records on medication use differed between participants, from pharmacy records and self-reported use, leading to misclassification:
library(episensr) seq_bias1 <- chien %>% misclass(., type = "exposure", bias_parms = c(24/(24+19), 18/(18+13), 144/(144+2), 130/(130+4))) seq_bias1
Controls and cases also enrolled into the study at different rates.
By storing the result of misclass()
in an object named here seq_bias1
, we have access to the various elements returned by the function (see the help()
for a given function to know what is returned).
The bias-adjusted cell frequencies can be accessed as corr_data
.
seq_bias1$corr_data
This 2-by-2 table will be used as starting values for the next sequential bias adjustment, selection()
.
seq_bias2 <- seq_bias1$corr_data %>% selection(., bias_parms = c(.734, .605, .816, .756)) seq_bias2
The adjusted OR is now r round(seq_bias2$adj_measures[2, 1], 2)
Again, the bias-adjusted cell frequencies can be used in the next bias analysis, confounders()
.
seq_bias2$corr_data
The association between antidepressant use and breast cancer was adjusted for various confounders (race/ethnicity, income, etc.). None of these confounders were found to change the association by more than 10%. However, for illustration, we can add the effect of a potential confounder (e.g. physical activity):
seq_bias3 <- seq_bias2$corr_data %>% confounders(., type = "OR", bias_parms = c(.8, .299, .436)) seq_bias3
The serially bias-adjusted OR is r round(seq_bias3$adj_measures[2, 1], 3)
.
And the adjusted cells by confounders, for regular exercise:
seq_bias3$cfder_data
And for no regular exercise:
seq_bias3$nocfder_data
The same process can be realized in a probabilistic framework, as each probsens()
, probsens.sel()
and probsens_conf()
provides the adjusted cell frequencies as A1, B1, C1, D1 in sim_df
.
| | Exposed | Not exposed | |---------:|:-------:|:-----------:| | Cases | A1 | B1 | | Controls | C1 | D1 |
mod1 <- chien %>% probsens(., type = "exposure", seca = list("trapezoidal", c(.45, .5, .6, .65)), seexp = list("trapezoidal", c(.4, .48, .58, .63)), spca = list("trapezoidal", c(.95, .97, .99, 1)), spexp = list("trapezoidal", c(.96, .98, .99, 1)), corr_se = .8, corr_sp = .8) str(mod1)
Each of the lines from mod1$sim_df[, 5:8]
can then be tabulated and fed to the next bias function.
Be careful, as the number of observations can quickly become unmanageable.
head(mod1$sim_df[, 5:8])
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.