Learn R Programming

mediation (version 1.0)

summary.mediate: Summarizing output from mediation analysis.

Description

Function to report results from mediation analysis. Reported categories are mediation effect, direct effect, total effect, and proportion of total effect mediated. All quantities reported with 95 percent confidence intervals. If the INT = TRUE option is selected in the mediate function, which allows for a treatment X mediator interaction, then effects are reported separetly for the treatment and control groups.

Usage

## S3 method for class 'mediate':
summary(object, ...) 

## S3 method for class 'summary.mediate': print(x, ...)

Arguments

object
Output from mediate function.
x
Output from mediate function.
...
Additional arguments to be passed.

References

Imai, Kosuke, Luke Keele and Dustin Tingley (2009) A General Approach to Causal Mediation Analysis. Imai, Kosuke, Luke Keele and Teppei Yamamoto (2009) Identification, Inference, and Sensitivity Analysis for Causal Mediation Effects.

See Also

See also mediate

Examples

Run this code
#Example with JOBS II Field experiment
#For illustration purposes simulations set to low number.

#Example with JOBS II Field experiment
data(jobs)


#########################################
#continuous mediator and continuous outcome
#########################################

#fit parametric model
model.m <- lm(job_seek ~ treat + depress1 + econ_hard + sex + age  + occp + marital + nonwhite + educ + income, data=jobs)
model.y <- lm(depress2 ~ treat + job_seek + depress1 + econ_hard + sex + age + occp + marital + nonwhite + educ + income, data=jobs)
continuous <- mediate(model.m , model.y, sims=1000, T="treat", M="job_seek")
summary(continuous)

Run the code above in your browser using DataLab