plot_spcma: Plot the outcome

Description Usage Arguments Details Author(s) Examples

Description

This function realizes the visualization of the result of multiple mediation analysis.

Usage

1
2
plot_spcma(object, plot.coef = c("alpha", "beta", "IE"), 
  cex.lab = 1, cex.axis = 1, pt.cex = 1, ...)

Arguments

object

mcma_PCA or mcma_BK object.

plot.coef

a character indicating the parameter to be plotted.

cex.lab

the magnification to be used for x and y labels relative to the current setting of cex. See par.

cex.axis

the magnification to be used for axis annotation relative to the current setting of cex. See par.

pt.cex

a numerical value giving the amount by which plotting text and symbols should be magnified relative to the default. See par.

...

additional argument to be passed.

Details

Visualization of the parameter estimates in the multiple mediation analysis.

Author(s)

Yi Zhao, Johns Hopkins University, zhaoyi1026@gmail.com;

Martin A. Lindquist, Johns Hopkins University, mal2053@gmail.com;

Brian S. Caffo, Johns Hopkins University, bcaffo@gmail.com.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#############################################
data(env.example)
X<-get("X",env.example)
M<-get("M",env.example)
Y<-get("Y",env.example)
Phi<-get("Phi",env.example)

# marginal mediation analysis on causally independent mediators
M.tilde<-M%*%Phi
re.BK<-mcma_BK(X,M.tilde,Y,boot=FALSE)
plot_spcma(re.BK,plot.coef="IE")

# principal component based mediation analysis
re.PCA<-mcma_PCA(X,M,Y,adaptive=TRUE,var.per=0.75,boot=FALSE)
plot_spcma(re.PCA,plot.coef="IE")

# sparse principal component based mediation analysis
re.SPCA<-spcma(X,M,Y,adaptive=TRUE,var.per=0.75,boot=FALSE,PC.run=FALSE)
plot_spcma(re.SPCA$SPCA,plot.coef="IE")
#############################################

zhaoyi1026/spcma documentation built on May 4, 2019, 1:23 p.m.