Learn R Programming

iMediate (version 0.5.5)

print.mdn: Print Method for Class ``mdn''

Description

print.mdn is the print utility for the output from function mdn

Usage

# S3 method for mdn
print(x, ...)

Arguments

x

an output from function mdn

not used.

Details

The p-value for the mediated effect is displayed as greater or smaller than sig.level. For instance, if it is not significant at level 0.05, then ``> 0.05'' is displayed.

Examples

Run this code
# NOT RUN {
data("jobs", package = "mediation")

fit.M <- lm(job_seek ~ treat + econ_hard + sex + age, data=jobs)
fit.Y <- lm(depress2 ~ treat + job_seek + econ_hard + sex + age, data=jobs)
mdn(fit.M, fit.Y, "treat")

# }

Run the code above in your browser using DataLab