# Version 1.1-0

## New features

- The Fisher-Yates correlation test (based on van der Waerden scores) is now available (see ?fisyat_test).
- The quadrant test is now available (see ?quadrant_test).
- The Koziol-Nemec test and its corresponding transformation function are now available (see ?koziol_test and ?koziol_trafo).
- The Savage test and its corresponding transformation function are now available (see ?savage_test and ?savage_trafo).
- The Taha test is now available (see ?taha_test).
- The Klotz test and its corresponding transformation function are now available (see ?klotz_test and ?klotz_trafo).
- The Mood test and its corresponding transformation function are now available (see ?mood_test and ?mood_trafo).
- The Conover-Iman test is now available (see ?conover_test).
- The weighted logrank test and its corresponding transformation function are now available, including weights for generalized Wilcoxon tests (Gehan-Breslow, Prentice, Prentice-Marek and Andersen-Borgan-Gill-Keiding), the Tarone-Ware class of tests, the Fleming-Harrington class of tests and the Self class of tests (see ?logrank_test, ?logrank_trafo and ?logrank_weight).
- The sign test for paired data is now available (see ?sign_test).
- The Quade test is now available (see ?quade_test).
- The Pearson chi-squared test, the generalized Cochran-Mantel-Haenszel test and the linear-by-linear association test now allow the alternative hypothesis to be specified in the doubly ordered case, i.e., when both the response variable and the explanatory variable are ordered factors (see ?chisq_test, ?cmh_test and ?lbl_test).
- The Kruskal-Wallis test, the van der Waerden test, the Brown-Mood median test, the logrank test and the Friedman test now allow the alternative hypothesis to be specified when the explanatory variable is an ordered factor (see ?kruskal_test, ?normal_test, ?median_test, ?logrank_test and ?friedman_test).
- The marginal homogeneity test now handles ordered responses and/or ordered measurement conditions and allows the alternative hypothesis to be specified in the doubly ordered case (see ?mh_test).
- The Brown-Mood median test and its corresponding transformation function now offer the choice of three different versions of the mid-score (see ?median_test and ?median_trafo).
- The van der Waerden test, the Brown-Mood median test and the Ansari-Bradley test now handle K-sample problems (see ?normal_test, ?median_test and ?ansari_test).
- The Fligner-Killeen test now handles two-sample problems (see ?fligner_test).
- Maximally selected statistics can now be computed for objects of class "table" (see ?maxstat_test).
- symmetry_test() has gained a new argument paired that is used to indicate if paired data have been transformed in such a way that the resulting unstandardized linear statistic is the sum of the absolute values of the positive differences between the paired observations (see ?symmetry_test).
- All transformation functions are now passing through missing values.
- New function for rank transformations (see ?rank_trafo).
- New function for maximally selected statistics transformation of ordered factors (see ?ofmaxstat_trafo).
- The Conover-Salsburg transformation function now allows the a constant to be set (see ?consal_trafo and ?neuropathy).
- The transformation function for ordered factors has gained a new argument scores that provides an alternative way of attaching scores to ordinal variables (see ?of_trafo).
- The approximative (Monte Carlo) null distribution can now be obtained by parallel operation using package parallel (see ?approximate).
- The exact null distribution of test statistics based on quadratic forms can now be obtained in the univariate two-sample case.
- The exact null distribution can now be obtained for tests specified with case weights, implying that exact p-values can be computed for 2 x 2 tables or K x 2 tables with K ordered categories.
- Evaluation of the null distribution can now be suppressed for all test procedures by setting distribution = "none".
- The mid-p-value can now be computed and is accompanied by a 99 % mid-p confidence interval when resampling has been used to obtain the null distribution (see ?midpvalue).
- The p-value interval can now be computed (see ?pvalue_interval).
- Step-down adjusted p-values based on the joint distribution of the test statistics can now be obtained when the asymptotic null distribution is used.
- Adjusted p-values based on the marginal distributions of the test statistics can now be obtained when the asymptotic null distribution is used.
- Adjusted p-values based on the marginal distributions of the test statistics now use a max-T procedure, instead of a min-P (which is now deprecated), incorporating discrete distributional characteristics when the approximative (Monte Carlo) null distribution is used (see ?pvalue).
- Single-step or step-down adjusted p-values based on the marginal distributions of the test statistics can now be obtained using the Bonferroni or the Šidák method (see ?pvalue).
- Unadjusted p-values can now be obtained (see ?pvalue).
- Random numbers can now be generated from the permutation distribution (see ?rperm).
- New data sets on gastric cancer, congenital sex organ malformation and unaided distance vision have been added (see ?GTSG, ?malformations and ?vision).

## Bug fixes

- The standardized linear statistic of the Pearson chi-squared test was off by a factor sqrt(n / (n - 1)).
- The Pearson chi-squared test ignored user-specified transformations.
- Partial matching of the scores argument did not work for Pearson's chi-squared test and the marginal homogeneity test.
- The Fisher-Pitman permutation test, the Wilcoxon-Mann-Whitney test, the Kruskal-Wallis test, the van der Waerden test, the Brown-Mood median test, the Ansari-Bradley test, the Fligner-Killeen test, the Wilcoxon signed-rank test, the Friedman test and the Page test did not return an error message when supplied with a censored response variable.
- The Brown-Mood median test p-value computation used the wrong tail of the null distribution in the one-sided case.
- The test statistic of the Wilcoxon signed-rank test sometimes had the wrong sign, due to being based on the sum of the absolute values of the negative, instead of the positive, differences between the paired measurements.
- The Friedman test did not warn when weights were supplied.
- Maximally selected statistics did not handle user-specified scores for ordinal variables correctly.
- Two-sample problems were not identified as such if the grouping variable had unused factor levels, causing problems if, e.g., trying to use the subset argument of formula methods.
- Stratified tests were not allowed if block had unused factor levels, causing problems, e.g., if trying to use the subset argument of the formula methods.
- Transformations involving ordered factors or survival data sometimes failed when performed within blocks.
- The maximally selected statistics transformation for factors sometimes dropped its column names.
- The maximally selected statistics transformation for factors retained unused levels.
- Approximative (Monte Carlo) p-values for stratified tests were wrong when the data were not ordered with respect to the blocks.
- Exact p-values for stratified tests were wrong when each block contained precisely two observations.
- Exact p-values for tests with an ordinal grouping variable were wrong.
- The smallest single-step and step-down adjusted p-values sometimes differed from the global p-value.
- Single-step adjusted p-values were too small when the support of the null distribution contained values equal to the observed test statistics.
- Monotonicity of step-down adjusted p-values was not enforced when using the approximative (Monte Carlo) null distribution.
- The density function of asymptotic permutation distributions for maximum-type tests returned nonsense; it now reports NA.
- The density function of approximative (Monte Carlo) permutation distributions returned nonzero probabilities for values not included in the support.
- The density function of exact permutation distributions returned a zero-length vector for values not included in the support; the probability of such values are now reported as 0.
- The distribution and quantile functions of asymptotic permutation distributions for maximum-type tests were not handling vector arguments correctly.
- The quantile function of exact permutation distributions sometimes reported NA when the 100 % quantile was requested.
- The support of exact permutation distributions for stratified tests was not guaranteed to be distinct and ordered, which in turn caused failure when trying to obtain values from the density and quantile functions.
- The printed output of the Pearson chi-squared test and the generalized Cochran-Mantel-Haenszel test claimed that a Linear-by-Linear Association Test had been carried out even in the singly ordered case, i.e., when either the response variable or the explanatory variable is an ordered factor; these are now reported as Generalized Pearson Chi-squared Test and Generalized Cochran-Mantel-Haenszel Test respectively.
- The printed output of the Fisher-Pitman permutation test reported the parameter tested in the two-sample case when the explanatory variable was an ordered factor.
- The printed output of the one-sided Ansari-Bradley test reported the opposite direction of the specified alternative (but performed the test in the specified direction and thus reported the correct p-value).
- The printed output of the logrank test did not report whether a two- or K-sample test had been carried out.
- The printed output of the logrank test did not report the tested parameter in the two-sample case.
- The printed output of maximum-type tests did not include the alternative hypothesis.
- The printed output of the general symmetry test claimed that a General Independence Test had been carried out; it is now reported as General Symmetry Test.
- Objects of class "SymmetryProblem" were not checked for validity.

## User-visible changes

- The Pearson chi-squared test, the generalized Cochran-Mantel-Haenszel test, the linear-by-linear association test and the marginal homogeneity test now use a scalar test statistic in the doubly ordered case.
- The Fisher-Pitman permutation test, the Kruskal-Wallis test, the logrank test and the Friedman test now use a scalar test statistic in case the explanatory variable is an ordered factor.
- The Fisher-Pitman permutation test no longer allows the test statistic to be specified; a quadratic form is now used in the K-sample case.
- The Pearson chi-squared test, the generalized Cochran-Mantel-Haenszel test, the Kruskal-Wallis test, the Friedman test, the Fligner-Killeen test and the marginal homogeneity test no longer features the distribution argument (but still allow the type of null distribution to be specified).
- The Ansari-Bradley test no longer features the alternative argument (but still allows the alternative hypothesis to be specified).
- When the general symmetry test or the marginal homogeneity test is applied to a table, the variable indicating the measurement conditions has been renamed to conditions (from groups).
- The teststat argument no longer allows the use of maximum-type statistics and quadratic forms to be specified using "maxtype" and "quadtype" respectively.
- The median and logrank transformations are now increasing functions.
- The default number of Monte Carlo replicates used to approximate the exact conditional distribution has been increased to 10000.
- The exact distribution of stratified test statistics is now obtained more efficiently, and especially so for large numbers of strata.
- exact() has algorithm = "auto" as its new default, preserving the behavior of algorithm = "shift" in previous versions of the package.
- The shift algorithm (exact(algorithm = "shift")) no longer silently switches to the split-up algorithm when non-integer scores are detected; it now fails with an error message.
- Single-step adjusted p-values based on the joint distribution of the test statistics are now computed slightly faster due to using only the unique realizations of the test statistics.
- The support of an asymptotic null distribution is now reported as NA.
- Small changes in the printed output of the Pearson chi-squared test, the Fisher-Pitman permutation test, the Wilcoxon-Mann-Whitney test, the van der Waerden test, the Brown-Mood median test, the marginal homogeneity test, the Wilcoxon signed-rank test, and generalized maximally selected statistics.
- The printed output of the Fisher-Pitman permutation test now reports that a Linear-by-Linear Association Test is carried out when the explanatory variable is an ordered factor.
- In the printed output of the Ansari-Bradley test and the Spearman test the tested parameter has been renamed to ratio of scales and rho respectively.
- wilcoxsign_test.IndependenceProblem() has been replaced by wilcoxsign_test.SymmetryProblem().
- The "IndependenceTestStatistic" class is now virtual.
- Objects of class "IndependenceProblem" drop unused factor levels.
- Objects of classes "ScalarIndependenceTestStatistic" or "QuadTypeIndependenceTestStatistic" now have a paired slot.
- Objects of class "ScalarIndependenceTest" now has a parameter slot.
- Objects of classes "ApproxNullDistribution" or "AsymptNullDistribution" now have a slot seed containing the state of the random number generator.
- The package manual has been completely revised.
- The memory consumption during computations has been reduced.
- Henric Winell, a long-term collaborator who donated almost all changes in coin 1.1-0, is now listed as author. Welcome on board, Henric!

## Deprecated and defunct

- surv_test() is now deprecated and has been replaced by logrank_test().
- method = "discrete" in pvalue() is now deprecated.
- The Wilcoxon signed-rank test no longer features the defunct ties.method argument.