buildModMedSemModel: Builds model for moderated mediation anaysis using SEM

Description Usage Arguments Value Examples

View source: R/buildModMedSemModel.R

Description

Builds model for moderated mediation anaysis using SEM

Usage

1
2
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

1
2
model <-  buildModMedSemModel(xvar="procJustice", mvars= c("cynicism"),
          yvar = "CPB", xmmod = "insecure",mymod = "gender" ,cmvars =c("age"))

psytext/rosetta documentation built on Dec. 5, 2019, 10:16 a.m.