You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 592ddd7
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(permanova): test each term, report permutations, refuse untestable terms (#35)
adonis2 in the pinned vegan 2.7-3 defaults to by = NULL: one test of the
whole model. run_permanova read row 1 as the group term and a comment
called the rows sequential terms, so the reported R2/F/p mixed group and
run and the per-term list held a single "Model" row. adonis2 is now
called with by = "terms"; the top-level result names its term (group).
With permutations restricted within individuals (how(blocks = ...)),
permute enumerates every permutation when there are fewer than 999: six
individuals of two samples give 63, so the smallest attainable p is
1/64. That count was never reported. It is now (`permutations`,
`min_p_value`), read from the control adonis2 used.
A term constant within every block - group, when each individual
belongs to one group - never has its labels exchanged by within-block
permutation, so the p-value vegan prints for it does not test a group
difference (measured: 0.03125 with a real effect, 0.0625 on noise; it is
not fixed at 1). Its p-value is withheld with the reason; R2 and F are
still reported, and terms that vary within blocks (run) are tested as
before.
Tests (test_permanova.jl, against direct vegan::adonis2 calls with the
same seed): per-term names, R2, F and p match by = "terms"; 999
permutations unblocked; 63 permutations and floor 1/64 blocked; group's
p withheld with its reason while run's p and F match vegan. 184/184 with
test_determinism. Reverting by = "terms" and the refusal: 8 fail, 4
error. Frontend shows the reason and the permutation count; typecheck
clean, 27/27.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Joshua Jewell <developer@joshuajewell.dev>
0 commit comments