Returns a data frame containing point estimates, the lower confidence limit, and the upper confidence limit on the risk ratio scale (possibly through an approximate conversion) as well as E-values for the point estimate and the confidence interval limit closer to the null.

evalue(est, lo = NA, hi = NA, se = NA, delta = 1, true = c(0, 1), ...)

Arguments

est

The effect estimate that was observed but which is suspected to be biased. A number of class "estimate" (constructed with RR(), OR(), HR(), OLS(), or MD(); for E-values for risk differences, see evalues.RD()).

lo

Optional. Lower bound of the confidence interval. If not an object of class "estimate", assumed to be on the same scale as est.

hi

Optional. Upper bound of the confidence interval. If not an object of class "estimate", assumed to be on the same scale as est.

se

The standard error of the point estimate, for est of class "OLS"

delta

The contrast of interest in the exposure, for est of class "OLS"

true

A number to which to shift the observed estimate to. Defaults to 1 for ratio measures (RR(), OR(), HR()) and 0 for additive measures (OLS(), MD()).

...

Arguments passed to other methods.

Details

The estimate is converted appropriately before the E-value is calculated. See conversion functions for more details. The point estimate and confidence limits after conversion are returned, as is the E-value for the point estimate and the confidence limit closest to the proposed "true" value (by default, the null value.)

Examples

# compute E-value for leukemia example in VanderWeele and Ding (2017) evalue(RR(0.80), 0.71, 0.91)
#> point lower upper #> RR 0.800000 0.71 0.910000 #> E-values 1.809017 NA 1.428571
# you can also pass just the point estimate # and return just the E-value for the point estimate with summary() summary(evalue(RR(0.80)))
#> [1] 1.809017
# demonstrate symmetry of E-value # this apparently causative association has same E-value as the above summary(evalue(RR(1 / 0.80)))
#> [1] 1.809017
# E-value for a non-null true value summary(evalue(RR(2), true = 1.5))
#> You are calculating a "non-null" E-value, i.e., an E-value for the #> minimum amount of unmeasured confounding needed to move the estimate #> and confidence interval to your specified true value rather than to the #> null value.
#> [1] 2
## Hsu and Small (2013 Biometrics) Data ## sensitivity analysis after log-linear or logistic regression head(lead)
#> id smoking lead age male edu.lt9 edu.9to11 edu.hischl edu.somecol #> 1 41493 1 FALSE 77 0 0 1 0 0 #> 2 41502 1 FALSE 29 1 0 0 1 0 #> 3 41512 1 FALSE 80 0 0 0 0 1 #> 4 41545 1 FALSE 40 0 1 0 0 0 #> 5 41556 1 FALSE 38 1 0 1 0 0 #> 6 41558 1 FALSE 50 0 0 1 0 0 #> edu.college edu.unknown income income.mis white black mexicanam otherhispan #> 1 0 0 1.57 0 1 0 0 0 #> 2 0 0 3.41 0 0 0 1 0 #> 3 0 0 1.24 0 1 0 0 0 #> 4 0 0 1.27 0 0 0 1 0 #> 5 0 0 1.24 0 1 0 0 0 #> 6 0 0 1.22 0 0 1 0 0 #> otherrace #> 1 0 #> 2 0 #> 3 0 #> 4 0 #> 5 0 #> 6 0
## log linear model -- obtain the conditional risk ratio lead.loglinear = glm(lead ~ ., family = binomial(link = "log"), data = lead[,-1])
#> Warning: glm.fit: algorithm did not converge
est_se = summary(lead.loglinear)$coef["smoking", c(1, 2)] est = RR(exp(est_se[1])) lowerRR = exp(est_se[1] - 1.96*est_se[2]) upperRR = exp(est_se[1] + 1.96*est_se[2]) evalue(est, lowerRR, upperRR)
#> point lower upper #> RR 2.466433 1.672663 3.63689 #> E-values 4.368237 2.733388 NA
## logistic regression -- obtain the conditional odds ratio lead.logistic = glm(lead ~ ., family = binomial(link = "logit"), data = lead[,-1])
#> Warning: glm.fit: algorithm did not converge
est_se = summary(lead.logistic)$coef["smoking", c(1, 2)] est = OR(exp(est_se[1]), rare = FALSE) lowerOR = exp(est_se[1] - 1.96*est_se[2]) upperOR = exp(est_se[1] + 1.96*est_se[2]) evalue(est, lowerOR, upperOR)
#> point lower upper #> RR 1.643167 1.317079 2.049988 #> E-values 2.671189 1.963313 NA
# E-value for an OLS estimate # standardizing conservatively by SD(Y) ols = lm(age ~ income, data = lead) est = OLS(ols$coefficients[2], sd = sd(lead$age)) # for a 1-unit increase in income evalue(est = est, se = summary(ols)$coefficients['income', 'Std. Error'])
#> Confidence interval crosses the true value, so its E-value is 1.
#> point lower upper #> RR 1.015465 0.9952602 1.03608 #> E-values 1.140780 1.0000000 NA
# for a 0.5-unit increase in income evalue(est = est, se = summary(ols)$coefficients['income', 'Std. Error'], delta = 0.5)
#> Confidence interval crosses the true value, so its E-value is 1.
#> point lower upper #> RR 1.007703 0.9976273 1.01788 #> E-values 1.095805 1.0000000 NA
# E-value for Cohen's d = 0.5 with SE = 0.25 evalue(est = MD(.5), se = .25)
#> point lower upper #> RR 1.576173 1.010050 2.459603 #> E-values 2.529142 1.110803 NA
# compute E-value for HR = 0.56 with CI: [0.46, 0.69] # for a common outcome evalue(HR(0.56, rare = FALSE), lo = 0.46, hi = 0.69)
#> point lower upper #> RR 0.670084 0.585935 0.7735267 #> E-values 2.349531 NA 1.9080039
# for a rare outcome evalue(HR(0.56, rare = TRUE), lo = 0.46, hi = 0.69)
#> point lower upper #> RR 0.560000 0.46 0.690000 #> E-values 2.970223 NA 2.256198