Last data update: 2014.03.03

R: Relative effects plot of the fitted mma object
plot.mmaR Documentation

Relative effects plot of the fitted mma object

Description

Plot the marginal effect of the selected variable on the outcome, and the marginal effect of the predictor on the selected variable.

Usage

## S3 method for class 'mma'
plot(x,...,vari,xlim=range(data$x[,vari],na.rm=T))

Arguments

x

a mma object created initially call to mma, boot.met.binx, or boot.met.contx.

vari

an indices or the name of the variable to plot.

xlim

the range of the variable to be plotted.

...

other arguments passed to the plot function.

Details

plot.mma plots the marginal effect of the selected variable on the outcome, and the marginal effect of the predictor on the selected variable. If the predictor is binary, draw a histogram or boxplot of the marginal density of the variable at each different value of the predictor.

Author(s)

Qingzhao Yu qyu@lsuhsc.edu

References

Yu, Q., Fan, Y., and Wu, X. (2014) <doi: 10.4172/2155-6180.1000189>. "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

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,vari="exercises",xlim=c(0,50))

Results