buildModMedSemModel {rosetta} | R Documentation |
Builds model for moderated mediation anaysis using SEM
Description
Builds model for moderated mediation anaysis using SEM
Usage
buildModMedSemModel(
xvar,
mvars,
yvar,
xmmod = NULL,
mymod = NULL,
cmvars = NULL,
cyvars = NULL
)
Arguments
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 |
Value
lavaan model to be used in moderatedMediationSem
Examples
model <- buildModMedSemModel(xvar="procJustice", mvars= c("cynicism"),
yvar = "CPB", xmmod = "insecure",mymod = "gender" ,cmvars =c("age"))
[Package rosetta version 0.3.12 Index]