Learn R Programming

mma (version 1.0-0)

plot.mma: Relative effects plot of the fitted mma object

Description

Plot the relative effects of the predictor and the mediators in the mma object.

Usage

## S3 method for class 'mma':
plot(x,...)

Arguments

x
a mma object created initially call to mma, boot.met.binx, or boot.met.contx.
...
other arguments passed to the plot function.

Details

plot.mma plots the relative effects of the direct effect of the predictor and indirect effects of the mediators. Relative effects is defined as the (in)direct effect divided by the total effect. The plot is arranged in order from the largest to the smallest relative effect.

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

"mma","boot.med.binx" , "boot.med.contx"

Examples

Run this code
data("weight_behavior")
x=weight_behavior[,2:14]
 y=weight_behavior[,15]
 temp.b.b.glm<-mma(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, jointm=NULL,margin=1, n=2,
   seed=1,mart=FALSE,nu=0.001,D=3,distn="bernoulli",
   family1=binomial(link = "logit"),n2=2)
 plot(temp.b.b.glm)

Run the code above in your browser using DataLab