evalue.Rd
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), ...)
est | The effect estimate that was observed but which is suspected to be
biased. A number of class "estimate" (constructed with |
---|---|
lo | Optional. Lower bound of the confidence interval. If not an object
of class "estimate", assumed to be on the same scale as |
hi | Optional. Upper bound of the confidence interval. If not an object
of class "estimate", assumed to be on the same scale as |
se | The standard error of the point estimate, for |
delta | The contrast of interest in the exposure, for |
true | A number to which to shift the observed estimate to. Defaults to
1 for ratio measures ( |
... | Arguments passed to other methods. |
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.)
#> 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#>#> #> #>#> [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 convergeest_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 convergeest_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'])#>#> 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)#>#> point lower upper #> RR 1.007703 0.9976273 1.01788 #> E-values 1.095805 1.0000000 NA#> 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#> point lower upper #> RR 0.560000 0.46 0.690000 #> E-values 2.970223 NA 2.256198