View source: R/modmedEquation.R
modmedEquation | R Documentation |
Make moderated mediation equation
modmedEquation( X = "", M = NULL, Y = "", moderator = list(), labels = NULL, range = FALSE, covar = list() )
X |
A character vectors indicating independent variables |
M |
A character vectors indicating mediators |
Y |
A character vectors indicating dependent variables |
moderator |
moderator |
labels |
labels |
range |
Whether or not add range equation |
covar |
Optional list of covariates |
X="X";Y="Y" moderator=list(name=c("Z"),site=list(c("a","c"))) cat(modmedEquation(X=X,Y=Y,moderator=moderator,range=TRUE)) X="X";M="M";Y="Y" cat(modmedEquation(X=X,M=M,Y=Y,range=TRUE)) X="X";M="M";Y="Y" moderator=list(name=c("Z"),site=list(c("a","c"))) cat(modmedEquation(X=X,M=M,Y=Y,moderator=moderator,range=TRUE)) X="X";M="M";Y="Y";labels=NULL;range=FALSE moderator=list(name=c("X"),site=list(c("b"))) cat(modmedEquation(X=X,M=M,Y=Y,moderator=moderator,range=FALSE)) X="X";Y="Y" moderator=list(name=c("Z"),site=list(c("c"))) cat(modmedEquation(X=X,Y=Y,moderator=moderator,range=FALSE)) covar=list(name=c("C1","C2","C3"),label=c("ese","sex","tenure"),site=list(c("M","Y"),"Y","Y")) cat(modmedEquation(X=X,M="M",Y=Y,moderator=moderator,range=FALSE,covar=covar))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.