Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncate output of H0 and HA? #11

Closed
wleoncio opened this issue Oct 2, 2023 · 0 comments
Closed

Truncate output of H0 and HA? #11

wleoncio opened this issue Oct 2, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@wleoncio
Copy link
Member

wleoncio commented Oct 2, 2023

If there are many categories, the output of permChacko() can become a bit too wide. Example:

library(permChacko)
#> This is permChacko 0.1.0.9011
#> To learn more about the package, please read the documentation available in the commands below:
#> help("permChacko-package")
#> browseVignettes("permChacko")
permChacko(rpois(20, 5))
#> 
#>         Chacko Test for Order-restriction with Permutation Test
#> 
#> Null hypothesis           : p1 == p2 == p3 == p4 == p5 == p6 == p7 == p8 == p9 == p10 == p11 == p12 == p13 == p14 == p15 == p16 == p17 == p18 == p19 == p20
#> Alternative hypothesis    : p1 <= p2 <= p3 <= p4 <= p5 <= p6 <= p7 <= p8 <= p9 <= p10 <= p11 <= p12 <= p13 <= p14 <= p15 <= p16 <= p17 <= p18 <= p19 <= p20
#> 
#> Test statistic (chisq_bar): 9.954545
#> p-values:
#>   Analytic p-value        : 0.076533
#>   Numeric p-value         : 0.018000 (1000 permutations)
#>   Tabular p-value         : NA

Created on 2023-10-02 with reprex v2.0.2

In those cases ($k &gt; 10$, perhaps?), it would be nice to have the hypotheses be printed like such:

#> Null hypothesis           : p1 == p2 == p3 == ... == p18 == p19 == p20
#> Alternative hypothesis    : p1 <= p2 <= p3 <= ... <= p18 <= p19 <= p20

This can be achieved by editing the print.chacko_test() method on print.R. A subfunction may be important to keep things tidy, visually obsfuscating this (infrequent) truncation from the normal flow of the method.

@wleoncio wleoncio added enhancement New feature or request good first issue Good for newcomers labels Oct 2, 2023
@wleoncio wleoncio self-assigned this Nov 7, 2023
wleoncio added a commit that referenced this issue Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant