Quantifies how much misspecification of the population
\(\omega^2\) distorts an AIPE-based sample size plan. The planner
ss_aipe_omega_squared solves for the smallest N
that yields an expected CI width below the target at the planning
value. Here we generate G datasets from a balanced one-way
ANOVA with population \(\omega^2 = \)true_omega_squared and
df_effect + 1 groups at the planner-recommended N,
compute the noncentral F confidence interval on each
replication via ci_omega_squared, and summarize the
realized widths and coverage of true_omega_squared.
ss_aipe_omega_squared_sensitivity(
true_omega_squared = NULL,
estimated_omega_squared = NULL,
df_effect,
width,
specified_N = NULL,
conf_level = 0.95,
assurance = NULL,
G = 1000,
print_iter = FALSE,
filename = NULL
)A data.frame with rows for mean / median / SD of
the realized \(\hat\omega^2\) and interval width, the proportion
of intervals at or below width, tail-specific and overall
empirical non-coverage of true_omega_squared, and the input
echoes, including assurance (present only when an
assurance was supplied).
Population \(\omega^2\) (the data generating value); in \([0, 1)\).
\(\omega^2\) used to plan the study;
supply this or specified_N but not both.
Numerator degrees of freedom for the omnibus F, equal to the number of groups minus 1.
Desired full width of the confidence interval on \(\omega^2\).
Total sample size to evaluate (incompatible with
estimated_omega_squared).
Confidence level (default 0.95).
Optional assurance probability passed to
ss_aipe_omega_squared when resolving the planned
sample size.
Number of Monte Carlo replications (default 1000).
Logical. Print iteration index per replication.
Optional path for a comma separated file recording
every replication (the sample \(\hat\omega^2\), the two confidence
limits, the interval width, and two indicators of whether the
interval missed true_omega_squared 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. (2007). Confidence intervals for standardized effect sizes: Theory, application, and implementation. Journal of Statistical Software, 20(8), 1--24. tools:::Rd_expr_doi("10.18637/jss.v020.i08")
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 effect size measures.)
ss_aipe_omega_squared, ci_omega_squared
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_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(),
ss_aipe_semipartial_r_sensitivity()
# Well-specified: planner used omega^2 = 0.10, truth is 0.10.
# G is kept small here so the example runs quickly; raise it for a
# stable sensitivity estimate.
set.seed(113)
ss_aipe_omega_squared_sensitivity(
true_omega_squared = 0.10,
estimated_omega_squared = 0.10,
df_effect = 2, width = 0.10,
G = 25, print_iter = FALSE
)
Run the code above in your browser using DataLab