Description Usage Arguments Author(s) References See Also Examples
Function to report results from mediation analysis with treatment noncompliance. Reported categories are local average causal mediation effects, local average natural direct effects and local average treatment (total) effect.
1 2 3 4 5 |
object |
output from mediate function. |
conf.level |
confidence level for the intervals reported in the summary table. |
x |
output from summary.mediate function. |
... |
additional arguments affecting the summary produced. |
Teppei Yamamoto, Massachusetts Institute of Technology, teppei@mit.edu.
Tingley, D., Yamamoto, T., Hirose, K., Imai, K. and Keele, L. (2014). "mediation: R package for Causal Mediation Analysis", Journal of Statistical Software, Vol. 59, No. 5, pp. 1-38.
Yamamoto, T. (2013). Identification and Estimation of Causal Mediation Effects with Treatment Noncompliance. Unpublished manuscript.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# Examples with JOBS II Field Experiment
# ** For illustration purposes a small number of simulations are used **
require(parallel)
require(MASS)
data(jobs)
a <- lm(comply ~ treat + sex + age + marital + nonwhite + educ + income,
data = jobs)
b <- glm(job_dich ~ comply + treat + sex + age + marital + nonwhite + educ + income,
data = jobs, family = binomial)
c <- lm(depress2 ~ job_dich * (comply + treat) + sex + age + marital + nonwhite + educ + income,
data = jobs)
out <- ivmediate(a, b, c, sims = 50, boot = FALSE,
enc = "treat", treat = "comply", mediator = "job_dich")
summary(out)
plot(out)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.