This function takes the parameter estimates and covariances and performs the Sobel test for two ordered mediators.
sobelTest_ord(
mu1,
sig1,
mu2,
sig2,
mu3,
sig3,
mu2b = 0L,
sig2b = 0L,
mu3b = 0L,
sig3b = 0L,
sig12 = 0L,
sig12b = 0L,
sig13 = 0L,
sig13b = 0L,
sig22b = 0L,
sig23 = 0L,
sig23b = 0L,
sig2b3 = 0L,
sig2b3b = 0L,
sig33b = 0L,
indL = 1L,
mu1_0 = 0,
mu2_0 = 0,
mu3_0 = 0,
mu2b_0 = 0,
mu3b_0 = 0
)A p-value for the test for the indirect effect.
Value of the estimate of the independent variable on the first mediator.
Value of the variance of the estimate of the independent variable on the first mediator.
Value of the estimate of the first mediator on the second mediator.
Value of the variance of the estimate of the first mediator on the second mediator.
Value of the estimate of the second mediator on the response.
Value of the variance of the estimate of the second mediator on the response.
Value of the estimate of the effect of the interaction of the independent and first mediator variable on the second mediator.
Value of the variance of the estimate of the effect of the interaction of the independent and first mediator variable on the second mediator.
Value of the estimate of the effect of the interaction of the independent and second mediator variable on the response.
Value of the variance of the estimate of the effect of the interaction of the independent and second mediator variable on the response.
Value of the covariance between mu1 and mu2.
Value of the covariance between mu1 and mu2b.
Value of the covariance between mu1 and mu3.
Value of the covariance between mu1 and mu3b.
Value of the covariance between mu2 and mu2b.
Value of the covariance between mu2 and mu3.
Value of the covariance between mu2 and mu2b.
Value of the covariance between mu2b and mu3.
Value of the covariance between mu2b and mu3b.
Value of the covariance between mu3 and mu3b.
Value indicating the value of the independent variable used for the interaction. Typically 1.
Null value for mu1.
Null value for mu2.
Null value for mu3.
Null value for mu2b.
Null value for mu3b.
sobelTest_ord(1, .1, .25, .01, 0, 0, .15, .01, 0, 0)
Run the code above in your browser using DataLab