gemm {rosetta} | R Documentation |
Analyze moderated mediation model using SEM
Description
Analyze moderated mediation model using SEM
Usage
gemm(
data = NULL,
xvar,
mvars,
yvar,
xmmod = NULL,
mymod = NULL,
cmvars = NULL,
cyvars = NULL,
estMethod = "bootstrap",
nboot = 1000
)
Arguments
data |
data frame |
xvar |
predictor variable, must be either numerical or dichotomous |
mvars |
vector of names of mediator variables |
yvar |
dependent variable, must be numerical |
xmmod |
moderator of effect predictor on mediators, must be either numerical or dichotomous |
mymod |
moderator of effect mediators on dependent variable, must be either numerical or dichotomous |
cmvars |
covariates for mediators |
cyvars |
covariates for dependent variable |
estMethod |
estimation of standard errors method, bootstrap is default |
nboot |
number of bootstrap samples |
Value
gemm object
Examples
## Not run:
data("cpbExample")
res <- gemm(dat = cpbExample, xvar="procJustice", mvars= c("cynicism","trust"),
yvar = "CPB", nboot=500)
print(res)
## End(Not run)
[Package rosetta version 0.3.12 Index]