| sensitivity_meditcv | R Documentation |
Computes a mediation-specific extension of Kenneth Frank's (2000) Impact Threshold for a Confounding Variable (ITCV) for both pathways of a mediation model:
a-path: treatment -> mediator
b-path: mediator -> outcome (controlling for treatment)
The mediation ITCV (medITCV) quantifies how strong an unmeasured confounder
would need to be, in terms of the product r_{XC} \cdot r_{YC}, to
invalidate inference for each pathway.
sensitivity_meditcv(x, alpha = 0.05)
x |
A |
alpha |
Significance level. Default is |
An object of class "meditcv": a named list with elements
a_path, b_path, indirect, and alpha. Each pathway element
contains the observed partial correlation, critical partial correlation,
medITCV value, and benchmark confounder impacts.
Frank, K. A. (2000). Impact of a confounding variable on a regression coefficient. Sociological Methods & Research, 29(2), 147–194.
plot_meditcv(), print.meditcv()
data(sim_mediation)
fit <- robustmediate(
X ~ Z1 + Z2, M ~ X + Z1 + Z2, Y ~ X + M + Z1 + Z2,
data = sim_mediation, R = 20, verbose = FALSE
)
med <- sensitivity_meditcv(fit)
print(med)
plot_meditcv(med)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.