med_serial3_lav: Serial Mediation Model with Three Mediators (lavaan)

Description Usage Arguments Author(s)

View source: R/med.R

Description

Estimates the indirect effect in a serial mediation model, that is the product of α1, xi1 , xi3, and β2 from M1_i = δ_{M1} + α1 X_i + ε_{M1_i}, M2_i = δ_{M2} + α2 X_i + ξ1 M1_i + ε_{M2_i}, M3_i = δ_{M3} + α3 X_i + ξ2 M1_i + ξ3 M2_i + ε_{M3_i}, and Y_i = δ_Y + τ^{\prime} X_i + β1 M1_i + β2 M2_i + β3 M3_i + ε_{Y_i}.

Usage

1
med_serial3_lav(data, scale = FALSE, minimal = TRUE, est = FALSE, ...)

Arguments

data

A matrix with variables X, M, and Y.

scale

Logical. If TRUE, scales the data before fitting the model.

minimal

Logical. If TRUE, returns the indirect effect of X on Y through M. If FALSE, returns all the regression coefficients estimated.

est

Logical. If TRUE, returns a vector of parameter estimates and standard errors. If FALSE, returns the lavaan object.

...

Arguments to pass to lavaan::sem.

Author(s)

Ivan Jacob Agaloos Pesigan


jeksterslabds/jeksterslabRds documentation built on July 16, 2020, 3:41 p.m.