Compute the mean-deviation scaling factor from a change in partial eta squared
Source:R/compute_scale_factor.R
compute_scale_factor.RdGiven an existing partial eta squared for a term and a target partial eta
squared, returns the multiplier k that must be applied to that term's
additive contribution to the cell means in order to obtain the target effect
size under the same residual structure.
Value
A single positive numeric value k. k > 1 amplifies the
effect, k < 1 shrinks it, and k == 1 leaves it unchanged.
Details
The derivation is straightforward: partial eta squared can be written as
pes = SS_effect / (SS_effect + C), where C is the part of the
denominator held fixed by this package's rescaling. Thus
pes / (1 - pes) scales as the target effect's sum of squares. Scaling the
term's deviations by k scales the target effect's sum of squares by
k^2, so the required multiplier is
$$k = \sqrt{\frac{p_{\mathrm{new}} / (1 - p_{\mathrm{new}})}
{p_{\mathrm{old}} / (1 - p_{\mathrm{old}})}}.$$