View source: R/buildModMedSemModel.R
buildModMedSemModel | R Documentation |
Builds model for moderated mediation anaysis using SEM
buildModMedSemModel( xvar, mvars, yvar, xmmod = NULL, mymod = NULL, cmvars = NULL, cyvars = NULL )
xvar |
independent variable (predictor) |
mvars |
vector of names of mediators |
yvar |
dependent variable |
xmmod |
moderator of a path(s) |
mymod |
moderator of b path(s) |
cmvars |
covariates for predicting the mediators |
cyvars |
covariates for predicting the dependent variable |
lavaan model to be used in moderatedMediationSem
model <- buildModMedSemModel(xvar="procJustice", mvars= c("cynicism"), yvar = "CPB", xmmod = "insecure",mymod = "gender" ,cmvars =c("age"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.