Quantifies how much misspecification of the population semipartial
correlation distorts an AIPE-based sample size plan. The function
constructs a population covariance matrix whose implied semipartial
correlation between Y and \(X_1\) (partialing \(X_2,
\ldots, X_J\) out of \(X_1\) only, not out of Y) equals
true_r_sp, then on each replication draws an n-row
sample, computes the sample semipartial correlation, and forms a
Fisher's \(Z\)-style CI scaled by the standardized regression
coefficient.
ss_aipe_semipartial_r_sensitivity(
true_r_sp = NULL,
estimated_r_sp = NULL,
J,
width,
specified_N = NULL,
conf_level = 0.95,
assurance = NULL,
G = 1000,
print_iter = FALSE,
filename = NULL
)A data.frame with rows for the realized
semipartial correlation, the interval width, the proportion of
intervals at or below width, tail-specific and overall
non-coverage of true_r_sp, and the input echoes, including assurance (present only when an
assurance was supplied).
Population semipartial correlation; must lie in \((-1, 1)\).
Planning value passed to
ss_aipe_semipartial_r; supply this or
specified_N but not both.
Total number of predictors. Must be at least 1.
Desired full width of the CI on the semipartial correlation.
Sample size to evaluate.
Confidence level (default 0.95).
Optional assurance probability.
Number of Monte Carlo replications.
Logical.
Optional path for a comma separated file recording
every replication (the sample semipartial correlation, the two confidence
limits, the interval width, and two indicators of whether the
interval missed true_r_sp below or above): nothing is
written when filename is NULL (the default), a new
file with a header row is created otherwise, an existing file at
that path is appended to, and a throwaway run should point it at
tempfile(fileext = ".csv").
Ken Kelley [email protected]
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.
ss_aipe_semipartial_r, ss_aipe_partial_r_sensitivity
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()
set.seed(113)
ss_aipe_semipartial_r_sensitivity(
true_r_sp = 0.30, estimated_r_sp = 0.30, J = 3, width = 0.20,
G = 50, print_iter = FALSE
)
Run the code above in your browser using DataLab