R arm of morie.fn.evalu, evaltw and jntmed.
Evalu: the E-value \(RR^* + \sqrt{RR^*(RR^* - 1)}\),
\(RR^* = \max(RR, 1/RR)\), of an observed risk ratio and of the confidence
limit closer to the null (1 when the interval covers 1). Evaltw is the
same with the three numbers given positionally. Jntmed: fits
\(M = i_1 + aX\) and \(Y = i_2 + c'X + bM\) by least squares and declares
mediation when both \(a\) and \(b\) are significant; the p-value is
\(\max(p_a, p_b)\).
Usage
Evalu(RR, ci_lower = NULL, ci_upper = NULL, rare_outcome = TRUE)
Evaltw(estimate, ci_lower, ci_upper)
Jntmed(x, m, y, alpha = 0.05)Arguments
- RR, estimate
Observed risk ratio (or a rare-outcome odds or hazard ratio).
- ci_lower, ci_upper
Confidence limits on the same scale (optional for
Evalu).- rare_outcome
Logical, recorded in the result (no transform is applied).
- x, m, y
Treatment, mediator and outcome vectors.
- alpha
Per-path significance level.
References
VanderWeele, T. J. and Ding, P. (2017). Sensitivity analysis in observational research: introducing the E-value. Annals of Internal Medicine 167(4), 268-274.
MacKinnon, D. P., Lockwood, C. M., Hoffman, J. M., West, S. G. and Sheets, V. (2002). A comparison of methods to test mediation and other intervening variable effects. Psychological Methods 7(1), 83-104.
