dot-integrate_dmod: Integration function for computing parametric signed or...

.integrate_dmodR Documentation

Integration function for computing parametric signed or unsigned d_{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_{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
)

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_{Signed}} (TRUE; default) or d_{Mod_{Unsigned}} (FALSE).

Details

The d_{Mod_{Signed}} effect size (i.e., the average of differences in prediction over the range of predictor scores) is computed as

d_{Mod_{Signed}}=\frac{1}{SD_{Y_{1}}}\intop f_{2}(X)\left[X\left(b_{1_{1}}-b_{1_{2}}\right)+b_{0_{1}}-b_{0_{2}}\right] dX

, where

  • SD_{Y_{1}} is the referent group's criterion standard deviation;

  • f_{2}(X) is the normal-density function for the distribution of focal-group predictor scores;

  • b_{1_{1}} and b_{1_{2}} are the slopes of the regression of Y on X for the referent and focal groups, respectively;

  • b_{0_{1}} and b_{0_{2}} are the intercepts of the regression of Y on X 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_{Unsigned}} effect size (i.e., the average of absolute differences in prediction over the range of predictor scores) is computed as

d_{Mod_{Unsigned}}=\frac{1}{SD_{Y_{1}}}\intop f_{2}(X)\left|X\left(b_{1_{1}}-b_{1_{2}}\right)+b_{0_{1}}-b_{0_{2}}\right|dX.

Value

A d_{Mod_{Signed}} or d_{Mod_{Unsigned}} effect size, depending on the signed argument.

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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1177/1094428116644505")}

Examples

## Not run: 
# Example for computing \eqn{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 \eqn{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)

## End(Not run)

jadahlke/psychmeta documentation built on April 29, 2024, 8:47 p.m.