Skip to content

Estimates and tests

A question is answered as many times as you like; every answer reads the same q.data.

Estimates: how large

q.estimate("hodges_lehmann")                        # analytic interval
q.estimate("hedges_gz", ci="bootstrap", n_boot=2000)  # seeded, recorded
Family Estimators
per group mean, median, proportion
per pair mean_diff, hodges_lehmann, prop_diff, odds_ratio, cohens_d / hedges_g, cohens_dz / hedges_gz, rank_biserial, cles
all groups eta_squared, epsilon_squared, partial_eta_squared, kendalls_w

Each estimator states what it needs (design, scale, binary outcome); one that doesn't fit is refused with the list of those that do. Intervals are analytic where a formula exists, else bootstrap (seed=0 by default) or upstream bootstrap draws stored as a replicate variable.

Tests: is there a difference

Question Paired Independent
two groups (per pair) wilcoxon, paired_ttest, ttest_ess, mcnemar, bootstrap mannwhitneyu, ttest, welch, bootstrap
all groups friedman, rm_anova kruskal, anova
curves (compare_along) cluster_permutation cluster_permutation
normality shapiro, normaltest (of each pair's differences) shapiro, normaltest (per group)

alternative and offset define the hypothesis (a - b against offset, e.g. superiority by a margin); effect sizes always describe the raw difference. Every test reports default effect sizes (rank-biserial and Hodges–Lehmann for Wilcoxon, mean difference and Hedges' g for t-tests...), computed by the same code as q.estimate.

Observations along an ordered axis of one recording (unit="time") are serially correlated: tests assuming independence are refused, with the measured effective sample size; ttest_ess accounts for it, and assume_independent=True overrides the refusal, recorded in the result.

Corrections

A result's rows are one family, corrected on return (correction="holm" by default). r.correct("fdr_bh") gives a new result; syn.correct([r_eeg, r_mag, r_grad], "holm") pools several results into one family. A cluster result corrects every cluster (family="cluster") or one p per pair (family="pair").

Results are values

A result holds its question's spec, the method and every setting, its table, the data_key it read, times and versions, and whether its question was pre-specified (timing). The study never stores results.

  • r.table, r.to_frame(pretty=True), r.to_markdown() (APA p values, estimate [CI], n per row, a note);
  • r.vs(): rows oriented on the reference, positive = reference better;
  • r.differences(), r.draws(), r.verdict(), r.curve(): the numbers behind it;
  • r.save("r.synr"), syn.load_result(path, study=...), study.verify(r);
  • r.plot().

See tutorials 09 to 11.