Determines the sample size needed for a confidence interval on a population semipartial correlation \(r_{Y(X \cdot Z_1 \cdots Z_J)}\) (the unique contribution of \(X\) to \(Y\) after controlling for \(Z_1, \ldots, Z_J\), with \(Y\) not residualized) to have a desired width, using the Olkin-Finn (1995) / Algina-Olejnik (2003) asymptotic variance and the AIPE framework of Kelley & Maxwell (2003).
ss_aipe_semipartial_r(
r_sp,
J,
width,
which_width = c("Full", "Lower", "Upper"),
conf_level = 0.95,
assurance = NULL
)A data.frame with rows for the recommended sample
size, the expected CI width at that sample size, and the inputs
echoed back.
Anticipated population semipartial correlation, in \((-1, 1)\).
Number of variables partialled out of \(X\) (count of \(Z_1, \ldots, Z_J\)); must be at least 1.
Desired full width of the confidence interval on the semipartial correlation.
Whether width refers to the "Full"
width (default) or the "Lower"/"Upper" half-width.
Desired confidence level (default 0.95).
Optional. Probability that the realized CI is no
wider than width. When supplied, the sample size is inflated
using the standard chi squared correction (Kelley & Maxwell, 2003).
Ken Kelley [email protected]
Asymptotic variance of the semipartial. Under multivariate normality, the sample semipartial correlation \(r_{Y(X \cdot Z)}\) has asymptotic variance $$\mathrm{Var}(\hat r_{Y(X \cdot Z)}) \;\approx\; \frac{(1 - r_{Y(X \cdot Z)}^2)^2}{n - J - 1}$$ (Olkin & Finn, 1995, with the partial-correlation degrees-of-freedom correction). Inverting for the sample size needed to achieve a target half-width \(w_{1/2}\) at confidence level \(1 - \alpha\): $$n \;=\; J + 1 + \Big\lceil z_{1 - \alpha/2}^{2} \cdot (1 - r_{Y(X \cdot Z)}^{2})^2 / w_{1/2}^{2} \Big\rceil.$$
Comparison with partial-r planning. The partial correlation
\(r_{XY \cdot Z}\) divides the covariance after residualizing both
\(X\) and \(Y\) on \(Z\); the semipartial divides after
residualizing only \(X\). The semipartial is the natural effect size
companion to a standardized regression coefficient: its square equals
the \(\Delta R^2\) contributed by \(X\) above and beyond the
controls. See var_semipartial_r for the asymptotic
variance, and ss_aipe_partial_r for the partial-correlation
analog of this function.
Note on conservatism of the assurance plan. The empirical
simulation study of the AIPE planner family finds that
ss_aipe_semipartial_r() is
on the boundary of its valid range at 80% assurance and modestly
conservative at 99% assurance. At \(\gamma = 0.80\), the realized
assurance at the recommended sample size is within Monte Carlo error
of the target, that is, the bound is operating at the edge of its
validity. At \(\gamma = 0.99\), the ideal sample size is about 15
to 20 subjects smaller than the recommended sample size, reflecting
the looser upper-tail bound at the 99% level. The recommended
sample size is therefore a sufficient sample size rather than the
smallest possible sample size. A small safety margin (5 to 10
subjects) is advisable when planning at \(\gamma = 0.80\). ss_aipe_semipartial_r_sensitivity quantifies the
overshoot for any one condition.
Algina, J., & Olejnik, S. (2003). Sample size tables for correlation analysis with applications in partial correlation and multiple regression analysis. Multivariate Behavioral Research, 38(3), 309--323. tools:::Rd_expr_doi("10.1207/s15327906mbr3803_02")
Cohen, J., Cohen, P., West, S. G., & Aiken, L. S. (2003). Applied multiple regression/correlation analysis for the behavioral sciences (3rd ed.). Lawrence Erlbaum.
Kelley, K., & Maxwell, S. E. (2003). Sample size for multiple regression: Obtaining regression coefficients that are accurate, not simply significant. Psychological Methods, 8(3), 305--321. tools:::Rd_expr_doi("10.1037/1082-989X.8.3.305")
Maxwell, S. E., Delaney, H. D., & Kelley, K. (2027). Designing experiments and analyzing data: A model comparison perspective (4th ed.). Routledge. (See Chapter 3 on the one-way ANOVA and Chapter 4 on contrasts.)
Olkin, I., & Finn, J. D. (1995). Correlations redux. Psychological Bulletin, 118(1), 155--164. tools:::Rd_expr_doi("10.1037/0033-2909.118.1.155")
var_semipartial_r, ss_aipe_partial_r,
ss_aipe_R2
design_consequences for what a chosen design delivers:
power, the Type S (sign) and Type M (exaggeration) errors of the
significance filter, and the expected confidence interval width.
Other AIPE sample size planning:
ss_aipe_c_sensitivity(),
ss_aipe_cliff_delta(),
ss_aipe_cliff_delta_sensitivity(),
ss_aipe_composite_sem(),
ss_aipe_equivalence_r(),
ss_aipe_equivalence_r_sensitivity(),
ss_aipe_equivalence_smd(),
ss_aipe_equivalence_smd_sensitivity(),
ss_aipe_icc(),
ss_aipe_icc_sensitivity(),
ss_aipe_indirect_effect(),
ss_aipe_indirect_effect_sensitivity(),
ss_aipe_mixed_effects_sensitivity(),
ss_aipe_omega_squared(),
ss_aipe_omega_squared_sensitivity(),
ss_aipe_partial_r(),
ss_aipe_partial_r_sensitivity(),
ss_aipe_pcm_sensitivity(),
ss_aipe_r(),
ss_aipe_r_sensitivity(),
ss_aipe_reliability_sensitivity(),
ss_aipe_semipartial_r_sensitivity()
# 1. Plan n so the 95% CI on r_sp (J = 3) has full width <= 0.15
# when the anticipated semipartial is 0.25.
ss_aipe_semipartial_r(r_sp = 0.25, J = 3, width = 0.15)
# 2. With 80% assurance:
ss_aipe_semipartial_r(r_sp = 0.25, J = 3, width = 0.15,
assurance = 0.80)
Run the code above in your browser using DataLab