sobelTest_one: Sobel test for the indirect effect - Single mediator path

View source: R/RcppExports.R

sobelTest_oneR Documentation

Sobel test for the indirect effect - Single mediator path

Description

This function takes the parameter estimates and covariances and performs the Sobel test for one mediator, or a single mediator path for multiple unordered mediators.

Usage

sobelTest_one(
  mu1,
  sig1,
  mu2,
  sig2,
  sig12,
  indL = 1,
  mu3 = 0L,
  sig3 = 0L,
  sig13 = 0L,
  sig23 = 0L,
  mu1_0 = 0,
  mu2_0 = 0,
  mu3_0 = 0
)

Arguments

mu1

Value of the estimate of the independent variable on the mediator.

sig1

Value of the variance of the estimate of the independent variable on the mediator.

mu2

Value of the estimate of the mediator on the response.

sig2

Value of the variance of the estimate of the mediator on the response.

sig12

Value of the covariance between mu1 and mu2.

indL

Value indicating the value of the independent variable used for the interaction. Typically 1.

mu3

Value of the estimate of the effect of the interaction of the independent and mediator variable on the response.

sig3

Value of the variance of the estimate of the effect of the interaction of the independent and mediator variable on the response.

sig13

Value of the covariance between mu1 and mu3.

sig23

Value of the covariance between mu2 and mu3.

mu1_0

Null value for mu1.

mu2_0

Null value for mu2.

mu3_0

Null value for mu3.

Value

A p-value for the test for the indirect effect.

Examples

sobelTest_one(1, .1, .25, .01, .05)

ieTest documentation built on April 12, 2025, 1:49 a.m.