med_serial3: Serial Mediation Model with Three Mediators

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(data, scale = FALSE, minimal = TRUE, s2 = FALSE, s2_est = "both")

Arguments

data

A matrix with variables X, M1, M2, M3, 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 M1, M2, amd M3. If FALSE, returns all the regression coefficients estimated.

s2

Logical. If TRUE, estimates residual variance.

s2_est

String. Residual variance estimator. If "both", returns both OLS and ML estimates as a vector. If "ols", returns OLS estimate. If "ml", returns ML estimate. Ignored if s2 = FALSE.

Author(s)

Ivan Jacob Agaloos Pesigan


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