mbias: Sensitivity analysis to correct for selection bias caused by...

View source: R/mbias.R

mbiasR Documentation

Sensitivity analysis to correct for selection bias caused by M bias.

Description

Simple sensitivity analysis to correct for selection bias caused by M bias using estimates of the odds ratios relating the variables.

Usage

mbias(or, var = c("y", "x", "a", "b", "m"))

Arguments

or

Vector defining the input bias parameters, in the following order:

  1. Odds ratio between A and the exposure E,

  2. Odds ratio between A and the collider M,

  3. Odds ratio between B and the collider M,

  4. Odds ratio between B and the outcome D,

  5. Odds ratio observed between the exposure E and the outcome D.

var

Vector defining variable names, in the following order:

  1. Outcome,

  2. Exposure,

  3. A,

  4. B,

  5. Collider.

Value

A list with elements:

model

Bias analysis performed.

mbias.parms

Three maximum bias parameters: in collider-exposure relationship created by conditioning on the collider, in collider-outcome relationship created by conditioning on the collider, and in exposure-outcome relationship created by conditioning on the collider.

adj.measures

Selection bias corrected odds ratio.

bias.parms

Input bias parameters.

labels

Variables' labels.

References

Greenland S. Quantifying biases in causal models: classical confounding vs. collider-stratification bias. Epidemiology 2003;14:300-6.

Examples

mbias(or = c(2, 5.4, 2.5, 1.5, 1),
var = c("HIV", "Circumcision", "Muslim", "Low CD4", "Participation"))

dhaine/episensr documentation built on March 18, 2024, 4:54 p.m.