mdt_simple {JSmediation}R Documentation

Joint-significance test for simple mediation

Description

Given a data frame, a predictor (IV), an outcome (DV), and a mediator (M), conducts a joint-significant test for simple mediation (see Yzerbyt, Muller, Batailler, & Judd, 2018).

Usage

mdt_simple(data, IV, DV, M)

Arguments

data

A data frame containing the variables to be used in the model.

IV

An unquoted numeric variable in the data frame which will be used as independent variable.

DV

An unquoted numeric variable in the data frame which will be used as dependent variable.

M

An unquoted numeric variable in the data frame which will be used as mediator.

Details

With simple mediation analysis, one is interested in finding if the effect of X on Y goes through a third variable M. The hypothesis behind this test is that X has an effect on M (a) that has an effect on Y (b), meaning that X has an indirect effect on Y through M.

The total effect of X on Y can be described as follows:

c = c' + ab

with c the total effect of X on Y, c' the direct of X on Y, and ab the indirect effect of X on Y through M (see Models section).

To assess whether the indirect effect is different from the null, one has to assess the significance against the null for both a (the effect of X on M) and b (effect of M on Y controlling for the effect of X). Both a and b need to be simultaneously significant for an indirect effect to be claimed (Cohen & Cohen, 1983; Yzerbyt, Muller, Batailler, & Judd, 2018).

Value

Returns an object of class "mediation_model".

An object of class "mediation_model" is a list containing at least the components:

type

A character string containing the type of model that has been conducted (e.g., "simple mediation").

method

A character string containing the approach that has been used to conduct the mediation analysis (usually "joint significance").

params

A named list of character strings describing the variables used in the model.

paths

A named list containing information on each relevant path of the mediation model.

indirect_index

A boolean indicating whether an indirect effect index has been computed or not. Defaults to FALSE. See add_index to compute mediation index.

indirect_index_infos

(Optional) An object of class "indirect_index". Appears when one applies add_index to an object of class "mediation_model".

js_models

A list of objects of class "lm". Contains every model relevant to joint-significance testing.

data

The original data frame that has been passed through data argument.

Models

In a simple mediation model, three models will be fitted:

with Y_i, the outcome value for the ith observation, X_i, the predictor value for the ith observation, and M_i, the mediator value for the ith observation (Cohen & Cohen, 1983; Yzerbyt, Muller, Batailler, & Judd, 2018).

Coefficients associated with a, b, c, and c' paths are respectively a_{21}, b_{32}, c_{11}, and c'_{31}.

Variable coding

Because joint-significance tests uses linear models behind the scenes, variables involved in the model have to be numeric. mdt_simple will give an error if non-numeric variables are specified in the model.

To convert a dichotomous categorical variable to a numeric one, please refer to the build_contrast function.

References

Cohen, J., & Cohen, P. (1983). Applied multiple regression/correlation analysis for the behavioral sciences (2nd ed). Hillsdale, N.J: L. Erlbaum Associates.

Yzerbyt, V., Muller, D., Batailler, C., & Judd, C. M. (2018). New recommendations for testing indirect effects in mediational models: The need to report and test component paths. Journal of Personality and Social Psychology, 115(6), 929–943. doi: 10.1037/pspa0000132

See Also

Other mediation models: mdt_moderated(), mdt_within()

Examples

## fit a simple mediation model
data(ho_et_al)
ho_et_al$condition_c <- build_contrast(ho_et_al$condition,
                                       "Low discrimination",
                                       "High discrimination")
mdt_simple(data = ho_et_al,
           IV = condition_c,
           DV = hypodescent,
           M = linkedfate)


[Package JSmediation version 0.2.2 Index]