med_serial2: Serial Mediation Model with Two 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, xi and β2 from M1_i = δ_{M1} + α1 X_i + ε_{M1_i}, M2_i = δ_{M2} + α2 X_i + ξ M1_i + ε_{M2_i}, and Y_i = δ_Y + τ^{\prime} X_i + β1 M1_i + β2 M2_i + ε_{Y_i}.

Usage

1
med_serial2(data, scale = FALSE, minimal = TRUE, s2 = FALSE, s2_est = "both")

Arguments

data

A matrix with variables X, M1, M2, 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 and M2. 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.