Add proportion-standardized Pillai separation estimates - #5
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add proportion-standardized Pillai separation estimates
Summary
This PR adds opt-in proportion-standardized Pillai estimates to
pillai_overlap()through the new argument:The existing default behavior is unchanged. In particular,
$pillairemains present and retains its existing value.When enabled, the function additionally returns:
n1,n2) and harmonic mean (H);d2_plugin);d2_unbiased);pillai_eq);Fallback behavior
When
d2_unbiased < 0, the result is explicitly flagged:pillai_eqisNA;pillai_eq_fallbackisTRUE;d2_fallback;bias_2p_over_H.The fallback is never silently reported as a proportion-standardized Pillai score.
Scope and definedness
The new estimator chain:
nu_e - p - 1 <= 0;p + 1observations as fragile;Documentation
The function documentation, README, and NEWS have been updated with:
Testing
Added tests covering:
manova()Pillai statistic;Validation completed under R 4.3.3:
testthatsuite: passed;R CMD build --no-manual: passed;R CMD check --no-manual: status OK;R CMD check --as-cran --no-manual: 0 errors and 0 warnings (one environment-related clock note).