test.TMint: Significance Test for Treatment-Mediator Interaction in...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/medtests.R

Description

Function to test whether the average causal mediation effects and direct effects are significantly different between the treatment and control contitions.

Usage

1
2
## S3 method for class 'mediate'
test.TMint(x, conf.level = x$conf.level, ...)

Arguments

x

output from mediate function.

conf.level

level of the returned two-sided confidence intervals for the effect differences. By default it is set to the value used in the original mediate call.

...

additional arguments.

Value

test.TMint returns an object of class "htest" when applied to a mediate object. See t.test for more explanations of the contents. The function returns an object of class "htest.order" which has its own print method included in this package.

Author(s)

Teppei Yamamoto, Massachusetts Institute of Technology, teppei@mit.edu.

References

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.

Imai, K., Keele, L. and Tingley, D. (2010) A General Approach to Causal Mediation Analysis, Psychological Methods, Vol. 15, No. 4 (December), pp. 309-334.

Imai, K., Keele, L. and Yamamoto, T. (2010) Identification, Inference, and Sensitivity Analysis for Causal Mediation Effects, Statistical Science, Vol. 25, No. 1 (February), pp. 51-71.

Imai, K., Keele, L., Tingley, D. and Yamamoto, T. (2009) "Causal Mediation Analysis Using R" in Advances in Social Science Research Using R, ed. H. D. Vinod New York: Springer.

See Also

mediate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 

# Examples with JOBS II Field Experiment

# **For illustration purposes a small number of simulations are used**

data(jobs)

# Fit mediator and outcome models allowing for treatment-mediator interaction
b <- lm(job_seek ~ treat + econ_hard + sex + age, data=jobs)
d <- lm(depress2 ~ treat*job_seek + econ_hard + sex + age, data=jobs)

# Test for significance of interaction
fit <- mediate(b, d, sims=50, treat="treat", mediator="job_seek")
test.TMint(fit)

carter-allen/mediation documentation built on Nov. 4, 2019, 8:45 a.m.