compute_dmod_par | R Documentation |
This function computes d_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.
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 )
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 |
rescale_cdf |
Logical argument that indicates whether parametric d_Mod results
should be rescaled to account for using a cumulative density < 1 in the computations ( |
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 = 1/SD_Y_1 * integrate(f_2(X) * [X * (b_1_1 - b_1_2) + b_0_1 - b_0_2]),
where
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_0 are the slopes of the regression of Y on X for the referent and focal groups, respectively;
b_0_1 and b_0_0 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_Under and d_Mod_Over effect sizes are computed using the same equation as d_Mod_Signed, but d_Mod_Under is the weighted average of all scores in the area of underprediction (i.e., the differences in prediction with negative signs) and d_Mod_Over is the weighted average of all scores in the area of overprediction (i.e., the differences in prediction with negative signs).
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 = 1/SD_Y_1 * integrate(f_2(X) * |X * (b_1_1 - b_1_2) + b_0_1 - b_0_2|).
The d_Min effect size (i.e., the smallest absolute difference in prediction observed over the range of predictor scores) is computed as
d_Min = 1/SD_Y_1 * Min[X * (b_1_1 - b_1_2) + b_0_1 - b_0_2].
The d_Max effect size (i.e., the largest absolute difference in prediction observed over the range of predictor scores)is computed as
d_Max = 1/SD_Y_1 * Max[X * (b_1_1 - b_1_2) + b_0_1 - b_0_2].
Note: When d_Min and d_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 d_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
.
A matrix of effect sizes (d_Mod_Signed,
d_Mod_Unsigned, d_Mod_Under,
d_Mod_Over), proportions of under- and over-predicted criterion scores,
minimum and maximum differences (i.e., d_Mod_Under and d_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.
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
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.