asq_ord: ASQ-Test for the indirect effect - Ordered Mediators

View source: R/RcppExports.R

asq_ordR Documentation

ASQ-Test for the indirect effect - Ordered Mediators

Description

This function takes a vector of significance levels, as well as estimates and covariances, or 3 U values, for the asq-test for an ordered mediation scenario. If estimates are passed to the function, the user must specify what distribution is to be used to find the cumulative probabilities. The smallest significance level for which the test is significant is returned, or 1 if no provided levels are significant. Additionally, the cutoff, either specified by number of squares or the percentage towards the center of the transformation region, can be specified.

Usage

asq_ord(
  alpha,
  u1 = NULL,
  u2 = NULL,
  u3 = NULL,
  V1Dist = NULL,
  V1 = NULL,
  V1_VAR = NULL,
  V1_DF = NULL,
  V2Dist = NULL,
  V2 = NULL,
  V2_VAR = NULL,
  V2_DF = NULL,
  V2b = 0,
  V2b_VAR = 0,
  V2bmult = 1L,
  V3Dist = NULL,
  V3 = NULL,
  V3_VAR = NULL,
  V3_DF = NULL,
  V3b = 0,
  V3b_VAR = 0,
  V1_V2_cov = 0,
  V1_V2b_cov = 0,
  V1_V3_cov = 0,
  V1_V3b_cov = 0,
  V2_V2b_cov = 0,
  V2_V3_cov = 0,
  V2_V3b_cov = 0,
  V2b_V3_cov = 0,
  V2b_V3b_cov = 0,
  V3_V3b_cov = 0,
  V1_0 = 0,
  V2_0 = 0,
  V2b_0 = 0,
  V3_0 = 0,
  V3b_0 = 0,
  numSquares = 4L,
  upLim = 0.5
)

Arguments

alpha

Significance levels to be tested.

u1, u2, u3

The U values to be used in the test. Given priority over estimates, but all must be supplied.

V1Dist

String value specifying the distribution of the estimate of the independent variable on the first mediator. Ignored if u1, u2, and u3 are supplied.

V1

Value of the estimate of the independent variable on the first mediator. Ignored if u1, u2, and u3 are supplied.

V1_VAR

Value of the variance of the estimate of the independent variable on the first mediator. Ignored if u1, u2, and u3 are supplied.

V1_DF

Degrees of freedom for V1. Only needed if t-distribution is used.

V2Dist

String value specifying the distribution of the estimate of the first mediator (and interaction term) on the second mediator.

V2

Value of the estimate of the first mediator on the second mediator. Ignored if u1, u2, and u3 are supplied.

V2_VAR

Value of the variance of the estimate of the first mediator on the second mediator. Ignored if u1, u2, and u3 are supplied.

V2_DF

Degrees of freedom for V2.

V2b

Value of the estimate of the effect of the interaction of the independent and first mediator variable on the second mediator. Ignored if u1, u2, and u3 are supplied.

V2b_VAR

Value of the variance of the estimate of the effect of the interaction of the independent and first mediator variable on the second mediator. Ignored if u1, u2, and u3 are supplied.

V2bmult

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

V3Dist

String value specifying the distribution of the estimate of the second mediator (and interaction term) on the response.

V3

Value of the estimate of the second mediator on the response. Ignored if u1, u2, and u3 are supplied.

V3_VAR

Value of the variance of the estimate of the second mediator on the response. Ignored if u1, u2, and u3 are supplied.

V3_DF

Degrees of freedom for V3.

V3b

Value of the estimate of the effect of the interaction of the independent and second mediator variable on the response. Ignored if u1, u2, and u3 are supplied.

V3b_VAR

Value of the variance of the estimate of the effect of the interaction of the independent and second mediator variable on the response. Ignored if u1, u2, and u3 are supplied.

V1_V2_cov

Value of the covariance between V1 and V2. Typically 0 for fully observed data.

V1_V2b_cov

Value of the covariance between V1 and V2b. Typically 0 for fully observed data.

V1_V3_cov

Value of the covariance between V1 and V3. Typically 0 for fully observed data.

V1_V3b_cov

Value of the covariance between V1 and V3b. Typically 0 for fully observed data.

V2_V2b_cov

Value of the covariance between V2 and V2b.

V2_V3_cov

Value of the covariance between V2 and V3. Typically 0 for fully observed data.

V2_V3b_cov

Value of the covariance between V2 and V3b. Typically 0 for fully observed data.

V2b_V3_cov

Value of the covariance between V2b and V3. Typically 0 for fully observed data.

V2b_V3b_cov

Value of the covariance between V2b and V3b. Typically 0 for fully observed data.

V3_V3b_cov

Value of the covariance between V3 and V3b.

V1_0

Null value for V1.

V2_0

Null value for V2.

V2b_0

Null value for V2b.

V3_0

Null value for V3.

V3b_0

Null value for V3b.

numSquares

The number of squares to be used in the asq-test. Always superseded by upLim.

upLim

The allowed extension, between 0 and 1, of the squares towards the center of the region

Value

The smallest significance level that would reject the null hypothesis.

Examples

asq_ord(c(.05, .01, .001), u1 = .02, u2= .015, u3 = .995, upLim = .55)

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