Skip to content

feat(analysis): Exact statistics layer — Fisher's exact, exact NB, permutation tests #3

Description

@hyperpolymath

Scientific Value

Parametric approximations break down with n<10 or sparse features. Exact tests provide valid inference.

Scope (Deferred)

  • Fisher exact, exact NB (edgeR), permutation PERMANOVA
  • Methods: exact_fisher, exact_nb, permutation

Difficulty: Hard

Risks: Performance 10-100x slower, memory for permutations, dependency edgeR

Acceptance Criteria

  • Methods in v2
  • BH mandatory
  • Benchmarks
  • Tests vs R fisher.test

Dependency status — refreshed 2026-09-22

Blocked by AnalysisConfig v1 — that blocker is stale and has been removed.
AnalysisConfig v1 shipped (#9 closed 2026-09-18); the layer is live in
src/analysis/AnalysisConfig.jl and passes 83 assertions on every CI run. Nothing was
waiting on it any more.

What actually stands between this issue and implementation is the validated statistics
layer (#1)
, and the bounded method catalogue that issue requires. That catalogue was
approved on 2026-09-22 and this issue is its item 4, deliberately excluded from v1:
Fisher's exact, exact negative binomial and permutation PERMANOVA are named in the
catalogue as the work that comes after the approved v1 scope, not alongside it.

So the position here is a decision, not a missing dependency — and it should be
recorded as one. Un-deferring means running this work through the same discipline #1
imposes on every other method: published supported/unsupported conditions, known-answer
and independent-reference tests (the R fisher.test comparison above is exactly that),
negative controls, performance benchmarks against the declared risk, and an owner
decision to open the stage. #2 sets the standard for how that gate is written down: a
closed prerequisite or a green test suite is not on its own sufficient.

See docs/milestones/02-deferred-issues.md for full spec.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions