Skip to contents

Decision logic:

  1. If y is NULL, one-sample t-test against zero.

  2. If paired = TRUE, paired t-test if differences are normal, otherwise Wilcoxon signed-rank.

  3. If two independent samples, check both-normal (Shapiro-Wilk for n<=5000, otherwise D'Agostino-Pearson); if both normal, run Student's or Welch's t depending on Levene's test; otherwise Mann-Whitney U.

Usage

auto_test(x, y = NULL, paired = FALSE, confidence = 0.95)

Arguments

x

Numeric vector.

y

Optional second sample.

paired

Whether samples are paired.

confidence

Confidence level.