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 group's intercept.
Referent group's slope.
Focal groups' intercepts.
Focal groups' slopes.
Focal groups' predictor-score means.
Focal groups' predictor-score standard deviations.
Referent group's criterion standard deviation.
Focal groups' minimum predictor scores.
Focal groups' maximum predictor scores.
Focal-group names. If NULL
(the default), the focal groups will be given numeric labels ranging from 1 through the number of groups.
Logical argument that indicates whether parametric \(d_{Mod}\) results
should be rescaled to account for using a cumulative density < 1 in the computations (TRUE
; default) or not (FALSE
).
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.
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_{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}}=\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.$$
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}=\frac{1}{SD_{Y_{1}}}Min\left[\left|X\left(b_{1_{1}}-b_{1_{2}}\right)+b_{0_{1}}-b_{0_{2}}\right|\right].$$
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}=\frac{1}{SD_{Y_{1}}}Max\left[\left|X\left(b_{1_{1}}-b_{1_{2}}\right)+b_{0_{1}}-b_{0_{2}}\right|\right].$$ 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
.
Nye, C. D., & Sackett, P. R. (2016). New effect sizes for tests of categorical moderation and differential prediction. Organizational Research Methods, https://doi.org/10.1177/1094428116644505.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab