Learn R Programming

mma (version 3.1-0)

print.med: Print an med object

Description

Print the estimation of mediation effects from an med object: from functions med.

Usage

"print"(x,...,digit=4)

Arguments

x
a med object created initially call to med.
...
other arguments passed to the print function.
digit
the number of digits to keep at printing.

References

Yu, Q., Fan, Y., and Wu, X. (2014) . "General Multiple Mediation Analysis With an Application to Explore Racial Disparity in Breast Cancer Survival," Journal of Biometrics & Biostatistics,5(2): 189.

See Also

"med"

Examples

Run this code
data("weight_behavior")
##binary x
#binary y
x=weight_behavior[,2:14]
y=weight_behavior[,15]
data.bin<-data.org(x,y,pred=2,contmed=c(8:10,12:13),binmed=c(7,11),
                   binref=c(1,1),catmed=6,catref=1,predref="M",alpha=0.4,alpha2=0.4)
temp1<-med(data=data.bin,n=2,seed=1)
temp2<-med(data=data.bin,n=2,seed=1,nonlinear=TRUE)
temp1
temp2

Run the code above in your browser using DataLab