Learn R Programming

DMAR (version 1.0.0)

ss_aipe_cliff_delta_sensitivity: Sensitivity Analysis for Sample Size Planning From the AIPE Perspective for Cliff's Delta

Description

Quantifies how much misspecification of the population Cliff's delta (\(\delta = \Pr(X > Y) - \Pr(X < Y)\)) distorts an AIPE-based sample size plan. On each replication the function simulates two independent samples whose population Cliff's delta equals true_delta, computes the sample cliff_delta and its CI, and summarizes the realized widths and coverage.

Data generating mechanism. The simulator draws each sample from a normal distribution and chooses the mean shift so that the implied Cliff's delta equals true_delta. For normal samples \(\delta = 2 \Phi(\Delta/\sqrt{2}) - 1\) where \(\Delta\) is the standardized mean difference, so the simulator sets \(\Delta = \sqrt{2} \cdot \Phi^{-1}((1 + \delta)/2)\).

Usage

ss_aipe_cliff_delta_sensitivity(
  true_delta = NULL,
  estimated_delta = NULL,
  ratio = 1,
  width,
  specified_N = NULL,
  conf_level = 0.95,
  assurance = NULL,
  G = 1000,
  print_iter = FALSE,
  filename = NULL
)

Value

A data.frame with rows for mean / median / SD of the realized Cliff's delta and CI width, the proportion of intervals at or below width, tail-specific and overall non-coverage of true_delta, and the input echoes, including assurance (present only when an assurance was supplied).

Arguments

true_delta

Population Cliff's delta (the data generating value); in \((-1, 1)\).

estimated_delta

Planning value passed to ss_aipe_cliff_delta; supply this or specified_N but not both.

ratio

Allocation ratio \(n_1 / n_2\) (default 1).

width

Desired full width of the CI on Cliff's delta.

specified_N

Total sample size to evaluate (split per ratio).

conf_level

Confidence level (default 0.95).

assurance

Optional assurance probability.

G

Number of Monte Carlo replications.

print_iter

Logical.

filename

Optional path for a comma separated file recording every replication (the sample Cliff's delta, the two confidence limits, the interval width, and two indicators of whether the interval missed true_delta 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").

Author

Ken Kelley [email protected]

References

Cliff, N. (1993). Dominance statistics: Ordinal analyses to answer ordinal questions. Psychological Bulletin, 114(3), 494--509. tools:::Rd_expr_doi("10.1037/0033-2909.114.3.494")

Maxwell, S. E., Delaney, H. D., & Kelley, K. (2027). Designing experiments and analyzing data: A model comparison perspective (4th ed.). Routledge.

See Also

ss_aipe_cliff_delta, cliff_delta

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_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(), ss_aipe_semipartial_r_sensitivity()

Examples

Run this code
set.seed(113)
# Small G keeps the Monte Carlo sweep fast; raise G for a real plan.
ss_aipe_cliff_delta_sensitivity(
  true_delta = 0.30, estimated_delta = 0.30,
  width = 0.30, G = 25, print_iter = FALSE
)

Run the code above in your browser using DataLab