Learn R Programming

psychmeta (version 2.6.4)

.integrate_dmod: Integration function for computing parametric signed or unsigned d_Modd_Mod effect sizes for a single focal group

Description

This internal function exists to support the compute_dmod_par() function, but may also be useful as a bare-bones tool for computing signed and unsigned d_Modd_Mod effect sizes. Please note that this function does not include an option for re-scaling its result to compensate for cumulative densities smaller than 1.

Usage

.integrate_dmod(
  referent_int,
  referent_slope,
  focal_int,
  focal_slope,
  focal_mean_x,
  focal_sd_x,
  referent_sd_y,
  focal_min_x,
  focal_max_x,
  signed = TRUE
)

Value

A d_Mod_Signedd_Mod_Signed or d_Mod_Unsignedd_Mod_Unsigned effect size, depending on the signed argument.

Arguments

referent_int

Referent group's intercept.

referent_slope

Referent group's slope.

focal_int

Focal group's intercept.

focal_slope

Focal group's slope.

focal_mean_x

Focal group's predictor-score mean.

focal_sd_x

Focal group's predictor-score standard deviation.

referent_sd_y

Referent group's criterion standard deviation.

focal_min_x

Focal group's minimum predictor score.

focal_max_x

Focal group's maximum predictor score.

signed

Logical argument that indicates whether the function should compute d_Mod_Signedd_Mod_Signed (TRUE; default) or d_Mod_Unsignedd_Mod_Unsigned (FALSE).

Details

The d_Mod_Signedd_Mod_Signed effect size (i.e., the average of differences in prediction over the range of predictor scores) is computed as d_Mod_Signed=1SD_Y_1 f_2(X)X(b_1_1-b_1_2)+b_0_1-b_0_2 dXd_Mod_Signed = 1/SD_Y_1 * integrate(f_2(X) * X * (b_1_1 - b_1_2) + b_0_1 - b_0_2), where

  • SD_Y_1SD_Y_1 is the referent group's criterion standard deviation;

  • f_2(X)f_2(X) is the normal-density function for the distribution of focal-group predictor scores;

  • b_1_1b_1_1 and b_1_2b_1_2 are the slopes of the regression of YY on XX for the referent and focal groups, respectively;

  • b_0_1b_0_1 and b_0_2b_0_2 are the intercepts of the regression of YY on XX for the referent and focal groups, respectively; and

  • the integral spans all X scores within the operational range of predictor scores for the focal group.

The d_Mod_Unsignedd_Mod_Unsigned effect size (i.e., the average of absolute differences in prediction over the range of predictor scores) is computed as d_Mod_Unsigned=1SD_Y_1 f_2(X)|X(b_1_1-b_1_2)+b_0_1-b_0_2|dX.d_Mod_Unsigned = 1/SD_Y_1 * integrate(f_2(X) * |X * (b_1_1 - b_1_2) + b_0_1 - b_0_2|).

References

Nye, C. D., & Sackett, P. R. (2017). New effect sizes for tests of categorical moderation and differential prediction. Organizational Research Methods, 20(4), 639–664. tools:::Rd_expr_doi("10.1177/1094428116644505")

Examples

Run this code
if (FALSE) {
# Example for computing \mjeqn{d_{Mod_{Signed}}}{d_Mod_Signed}
.integrate_dmod(referent_int = -.05, referent_slope = .5,
              focal_int = -.05, focal_slope = .3,
              focal_mean_x = -.5, focal_sd_x = 1,
              referent_sd_y = 1, focal_min_x = -Inf, focal_max_x = Inf,
              signed = TRUE)

# Example for computing \mjeqn{d_{Mod_{Unsigned}}}{d_Mod_Unsigned}
.integrate_dmod(referent_int = -.05, referent_slope = .5,
              focal_int = -.05, focal_slope = .3,
              focal_mean_x = -.5, focal_sd_x = 1,
              referent_sd_y = 1, focal_min_x = -Inf, focal_max_x = Inf,
              signed = FALSE)
}

Run the code above in your browser using DataLab