compute_dmod_par: Function for computing parametric \mjeqnd_Modd_Mod effect...

Description Usage Arguments Details Value References Examples

View source: R/compute_dmod.R

Description

This function computes \mjeqnd_Modd_Mod effect sizes from user-defined descriptive statistics and regression coefficients. If one has access to a raw data set, the dMod function may be used as a wrapper to this function so that the regression equations and descriptive statistics can be computed automatically within the program.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
compute_dmod_par(
  referent_int,
  referent_slope,
  focal_int,
  focal_slope,
  focal_mean_x,
  focal_sd_x,
  referent_sd_y,
  focal_min_x,
  focal_max_x,
  focal_names = NULL,
  rescale_cdf = TRUE
)

Arguments

referent_int

Referent group's intercept.

referent_slope

Referent group's slope.

focal_int

Focal groups' intercepts.

focal_slope

Focal groups' slopes.

focal_mean_x

Focal groups' predictor-score means.

focal_sd_x

Focal groups' predictor-score standard deviations.

referent_sd_y

Referent group's criterion standard deviation.

focal_min_x

Focal groups' minimum predictor scores.

focal_max_x

Focal groups' maximum predictor scores.

focal_names

Focal-group names. If NULL (the default), the focal groups will be given numeric labels ranging from 1 through the number of groups.

rescale_cdf

Logical argument that indicates whether parametric \mjeqnd_Modd_Mod results should be rescaled to account for using a cumulative density < 1 in the computations (TRUE; default) or not (FALSE).

Details

The \mjeqnd_Mod_Signedd_Mod_Signed effect size (i.e., the average of differences in prediction over the range of predictor scores) is computed as \mjdeqnd_Mod_Signed=\frac1SD_Y_1\intop f_2(X)\left[X\left(b_1_1-b_1_2\right)+b_0_1-b_0_2\right] dX,d_Mod_Signed = 1/SD_Y_1 * integrate(f_2(X) * [X * (b_1_1 - b_1_2) + b_0_1 - b_0_2]), where

The \mjeqnd_Mod_Underd_Mod_Under and \mjeqnd_Mod_Overd_Mod_Over effect sizes are computed using the same equation as \mjeqnd_Mod_Signedd_Mod_Signed, but \mjeqnd_Mod_Underd_Mod_Under is the weighted average of all scores in the area of underprediction (i.e., the differences in prediction with negative signs) and \mjeqnd_Mod_Overd_Mod_Over is the weighted average of all scores in the area of overprediction (i.e., the differences in prediction with negative signs).

The \mjeqnd_Mod_Unsignedd_Mod_Unsigned effect size (i.e., the average of absolute differences in prediction over the range of predictor scores) is computed as \mjdeqnd_Mod_Unsigned=\frac1SD_Y_1\intop f_2(X)\left|X\left(b_1_1-b_1_2\right)+b_0_1-b_0_2\right|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|).

The \mjeqnd_Mind_Min effect size (i.e., the smallest absolute difference in prediction observed over the range of predictor scores) is computed as \mjdeqnd_Min=\frac1SD_Y_1Min\left[\left|X\left(b_1_1-b_1_2\right)+b_0_1-b_0_2\right|\right].d_Min = 1/SD_Y_1 * Min[X * (b_1_1 - b_1_2) + b_0_1 - b_0_2].

The \mjeqnd_Maxd_Max effect size (i.e., the largest absolute difference in prediction observed over the range of predictor scores)is computed as \mjdeqnd_Max=\frac1SD_Y_1Max\left[\left|X\left(b_1_1-b_1_2\right)+b_0_1-b_0_2\right|\right].d_Max = 1/SD_Y_1 * Max[X * (b_1_1 - b_1_2) + b_0_1 - b_0_2]. Note: When \mjeqnd_Mind_Min and \mjeqnd_Maxd_Max are computed in this package, the output will display the signs of the differences (rather than the absolute values of the differences) to aid in interpretation.

If \mjeqnd_Modd_Mod effect sizes are to be rescaled to compensate for a cumulative density less than 1 (see the rescale_cdf argument), the result of each effect size involving integration will be divided by the ratio of the cumulative density of the observed range of scores (i.e., the range bounded by the focal_min_x and focal_max_x arguments) to the cumulative density of scores bounded by -Inf and Inf.

Value

A matrix of effect sizes (\mjeqnd_Mod_Signedd_Mod_Signed, \mjeqnd_Mod_Unsignedd_Mod_Unsigned, \mjeqnd_Mod_Underd_Mod_Under, \mjeqnd_Mod_Overd_Mod_Over), proportions of under- and over-predicted criterion scores, minimum and maximum differences (i.e., \mjeqnd_Mod_Underd_Mod_Under and \mjeqnd_Mod_Overd_Mod_Over), and the scores associated with minimum and maximum differences. Note that if the regression lines are parallel and infinite focal_min_x and focal_max_x values were specified, the extrema will be defined using the scores 3 focal-group SDs above and below the corresponding focal-group means.

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. doi: 10.1177/1094428116644505

Examples

1
2
3
4
5
6
compute_dmod_par(referent_int = -.05, referent_slope = .5,
                 focal_int = c(.05, 0, -.05), focal_slope = c(.5, .3, .3),
                 focal_mean_x = c(-.5, 0, -.5), focal_sd_x = rep(1, 3),
                 referent_sd_y = 1,
                 focal_min_x = rep(-Inf, 3), focal_max_x = rep(Inf, 3),
                 focal_names = NULL, rescale_cdf = TRUE)

psychmeta documentation built on June 1, 2021, 9:13 a.m.