Description Usage Arguments Details Author(s) Examples
This function realizes the visualization of the result of multiple mediation analysis.
1 2 | plot_spcma(object, plot.coef = c("alpha", "beta", "IE"),
cex.lab = 1, cex.axis = 1, pt.cex = 1, ...)
|
object |
|
plot.coef |
a character indicating the parameter to be plotted. |
cex.lab |
the magnification to be used for |
cex.axis |
the magnification to be used for axis annotation relative to the current setting of |
pt.cex |
a numerical value giving the amount by which plotting text and symbols should be magnified relative to the default. See |
... |
additional argument to be passed. |
Visualization of the parameter estimates in the multiple mediation analysis.
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.
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")
#############################################
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.