Learn R Programming

epiR (version 2.0.90)

epi.evalue: Compute E-value for risk, rate, odds and hazard ratio estimates

Description

Returns a list of the point estimate, lower confidence limit, and upper confidence limit for risk, rate, odds or hazard ratio (as provided by the user) and E-values for the measure of association point estimate and the confidence interval limit closer to the null.

Usage

epi.evalue(x, measure = "risk.ratio", rare = TRUE, conf.level = 0.95)

Value

When measure == "risk.ratio" or measure == "rate.ratio" a list containing:

rr

a data frame listing the variable name, the point estimate of the risk ratio, the lower bound of the confidence interval of the risk ratio and the upper bound of the confidence interval of the risk ratio, as entered by the user through argument x.

eval

a data frame listing est the E-value for the point estimate of the risk ratio (e.g., the estimated RR or OR), low the E-value for the confidence limit closest to the null (often called the minimum or CI-bound E-value) and upp the E-value for the confidence limit farthest from the null (sometimes called the maximum or outer-bound E-value).

When measure == "odds.ratio" a list containing:

or

a data frame listing the variable name, the point estimate of the odds ratio, the lower bound of the confidence interval of the odds ratio and the upper bound of the confidence interval of the odds ratio, as entered by the user through argument x.

rr

a data frame listing the variable name, the point estimate of the risk ratio, the lower bound of the confidence interval of the risk ratio and the upper bound of the confidence interval of the risk ratio, computed using the odds ratio estimates entered by the user through argument x.

eval

a data frame listing est the E-value for the point estimate of the risk ratio (e.g., the estimated RR or OR), low the E-value for the confidence limit closest to the null (often called the minimum or CI-bound E-value) and upp the E-value for the confidence limit farthest from the null (sometimes called the maximum or outer-bound E-value).

When measure == "hazard.ratio" a list containing:

hr

a data frame listing the variable name, the point estimate of the hazard ratio, the lower bound of the confidence interval of the hazard ratio and the upper bound of the confidence interval of the hazard ratio, as entered by the user through argument x.

rr

a data frame listing the variable name, the point estimate of the risk ratio, the lower bound of the confidence interval of the risk ratio and the upper bound of the confidence interval of the risk ratio, computed using the hazard ratio estimates entered by the user through argument x.

eval

a data frame listing est the E-value for the point estimate of the risk ratio (e.g., the estimated RR or OR), low the E-value for the confidence limit closest to the null (often called the minimum or CI-bound E-value) and upp the E-value for the confidence limit farthest from the null (sometimes called the maximum or outer-bound E-value).

Arguments

x

an object of class glm, coxph or data.frame. If an object of class data.frame is provided the first column should be of class character listing the variable. Subsequent columns (2 to 4) should list (in order) the point estimate, the lower bound and the upper bound of the confidence interval of the measure of association.

measure

a character string indicating the measure used. Options are risk.ratio, rate.ratio, odds.ratio, or hazard.ratio.

rare

logical. If TRUE and measure = "odds.ratio" or measure = "hazard.ratio" it is assumed that the odds (or hazard) ratio are a valid approximation for the risk ratio.

conf.level

magnitude of the confidence interval provided in x. Must be a single number between 0 and 1.

Details

The E-value quantifies how strong an unmeasured confounder would need to be to fully explain the observed association between an exposure variable and an outcome variable. The E-value is expressed on the risk ratio scale and represents the minimum strength of association that the confounder must have with both the exposure and the outcome. Larger E-values indicate that the observed association is more robust to potential unmeasured confounding.

References

Ding P, VanderWeele T, (2016) Sensitivity analysis without assumptions. Epidemiology 27: 368 - 377.

VanderWeele TJ, Ding P (2017). Sensitivity analysis in observational research: Introducing the E-value. Annals of Internal Medicine 167: 268 - 274.

Examples

Run this code
## EXAMPLE 1:
## The birthwt data frame from the MASS package were collected at Baystate 
## Medical Center, Springfield, Massachusetts USA in 1986. A logistic 
## regression model is run to quantify the effect of smoking during pregancy 
## and delivery of a low birth weight baby, controlling for the effect of race.

library(MASS)
dat.df <- birthwt; head(dat.df)
dat.glm <- glm(low ~ smoke + race, family = binomial, data = dat.df)
table(dat.df$low)

## The study outcome (low birthweight) is relatively common so we set rare =
## FALSE

epi.evalue(x = dat.glm, measure = "odds.ratio", rare = FALSE, 
   conf.level = 0.95)

## $or
##     var      est      low      upp
## 1 smoke 3.054692 1.507644 6.432485
## 2  race 1.748883 1.196771 2.611134

## $rr
##     var      est      low      upp
## 1 smoke 1.747768 1.227861 2.536234
## 2  race 1.322453 1.093970 1.615900

## $eval
##     var      est      low upp
## 1 smoke 2.890975 1.756806  NA
## 2  race 1.975469 1.414596  NA

## After controlling for the effect of race, the odds of delivering a low 
## birth weight baby for smokers was 3.05 (95% CI 1.51 to 6.43) times that of
## non-smokers.

## After controlling for the effect of race, the risk of delivering a low 
## birth weight baby for smokers was 1.75 (95% CI 1.23 to 2.53) times that of
## non-smokers.  

## An unmeasured confounder in this study would need to be associated with both 
## smoking and delivery of a low birth weight baby by a risk ratio of at 
## least 2.89 each, above and beyond the measured covariates, to completely 
## explain the observed risk ratio of 1.75.

## The E-value for the lower confidence limit is 1.76. To reduce the 
## association enough that the lower bound of the risk ratio confidence limit 
## (1.23) would include the null, an unmeasured confounder would still need 
## to have associations of about 1.76 with both the exposure and the outcome.

Run the code above in your browser using DataLab