Learn R Programming

The EValue R package

The EValue package allows users to calculate bounds and E-values for unmeasured confounding in observational studies and meta-analyses. The package also includes functions for the assessment of selection bias and differential misclassification and the joint impact of all three types of bias.

Installation

You can install the released version of EValue from CRAN with:

install.packages("EValue")

Then load the package:

library(EValue)

Examples

E-values are simple to calculate. For example, the E-value for the association between cigarette smoking and lung cancer as observed by Hammond and Horn in 1958:

evalues.RR(est = 10.73, lo = 8.02, hi = 14.36)
#>             point    lower upper
#> RR       10.73000  8.02000 14.36
#> E-values 20.94777 15.52336    NA

For more on E-values for unmeasured confounding, see the vignette.

More complex assessment of several biases is also easy. To bound the bias due to unmeasured confounding, selection bias, and differential outcome misclassification, we can use background knowledge about the strength of the biases to propose sensitivity analysis parameters:

biases <- multi_bias(confounding(),
                     selection("general", "increased risk"),
                     misclassification("exposure", rare_outcome = TRUE))

multi_bound(biases,
            RRUcY = 2, RRAUc = 1.5,
            RRSUsA1 = 1.25, RRUsYA1 = 2.5,
            ORYAaS = 1.75)
#> [1] 2.386364

Read more about how to specify multiple biases and see several worked examples.

Other options

If all you need to do is calculate an E-value for unmeasured confounding, just try out the online calculator. Graphical interfaces are also linked under each of the types of sensitivity analysis in the header.

Copy Link

Version

Install

install.packages('EValue')

Monthly Downloads

982

Version

4.1.3

License

GPL-2

Maintainer

Maya Mathur

Last Published

October 28th, 2021

Functions in EValue (4.1.3)

bf_func

Internal function used to calculate arbitrary bias factors.
evalue

Compute an E-value for unmeasured confounding
effect_measures

Declare an effect measure
confounded_meta

Sensitivity analysis for unmeasured confounding in meta-analyses
confounding

Unmeasured confounding
evalues.RD

Compute E-value for a population-standardized risk difference and its confidence interval limits
evalues.OR

Compute E-value for an odds ratio and its confidence interval limits
lead

An example dataset
convert_measures

Convert an effect measure
bias_plot

Plot bias factor as function of confounding relative risks
evalues.RR

Compute E-value for a risk ratio or rate ratio and its confidence interval limits
deg_func

Internal function used to fit roots of a polynomial made up of the product of bias factors.
soyMeta

A meta-analysis on soy intake and breast cancer risk (Trock et al., 2006)
multi_bias

Create a set of biases for a multi-bias sensitivity analysis
sens_plot

Plots for sensitivity analyses
selection

Selection bias
misclassification

Misclassification
selection_evalue

Compute selection bias E-value for a hazard ratio and its confidence interval limits
multi_bound

Calculate a bound for the bias
toyMeta

An example meta-analysis
threshold_selection

Compute selection bias E-value for single value of risk ratio as well as a statement about what parameters it refers to
svalues.HR

Compute selection bias E-value for an estimate and its confidence interval limits
svalues.OR

Compute selection bias E-value for an odds ratio and its confidence interval limits
multi_evalue

Calculate a multiple-bias E-value
evalues.IC

Compute an E-value for unmeasured confounding for an additive interaction contrast
evalues.OLS

Compute E-value for a linear regression coefficient estimate
twoXtwoRR

Estimate risk ratio and compute CI limits from two-by-two table
evalues.MD

Compute E-value for a difference of means and its confidence interval limits
threshold

Compute E-value for single value of risk ratio
evalues.HR

Compute E-value for a hazard ratio and its confidence interval limits
svalues.RR

Compute selection bias E-value for a risk ratio or rate ratio and its confidence interval limits