The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
This package includes one function abwm.test(), which
performs the Ansari-Bradley test (Ansari & Bradley, 1960) with
missing data proposed in (Zeng et al., 2025). This method is a
theoretical extension of the Ansari-Bradley test, with controlled Type I
error regardless of values of missing data.
Bounds of the Ansari-Bradley test statistic and its p-value will be computed in the presence of missing data. The p-value of the test method proposed in (Zeng et al., 2025) is then returned as the maximum possible p-value of the Ansari-Bradley test.
You can install the development version of abwm from GitHub with:
# install.packages("devtools")
devtools::install_github("Yijin-Zeng/Ansari-Bradley-Test-with-Missing-data")This is a basic example which shows you how to perform the test with missing data:
library(abwm)
#### Two-sided test
X <- c(6.2, 3.5, NA, 7.6, 9.2)
Y <- c(NA, 1.3, -0.5, -1.7)
abwm.test(X, Y, alternative = 'two.sided')
#> $p.value
#> [1] 1
#>
#> $bounds.statistic
#> [1] 7 14
#>
#> $bounds.pvalue
#> [1] 0.04795881 1.00000000
#>
#> $alternative
#> [1] "two.sided"
#>
#> $data.name
#> [1] "X and Y"
## One-sided test
X <- c(6.2, 3.5, NA, 7.6, 9.2)
Y <- c(NA, 1.3, -0.5, -1.7)
abwm.test(X, Y, alternative = 'less')
#> $p.value
#> [1] 0.9176989
#>
#> $bounds.statistic
#> [1] 7 14
#>
#> $bounds.pvalue
#> [1] 0.02397941 0.91769888
#>
#> $alternative
#> [1] "less"
#>
#> $data.name
#> [1] "X and Y"The R function stats::ansari.test() performs the
Ansari-Bradley test when data are completely observed.
Y. Zeng, N. M. Adams, D. A. Bodenham. Scale two-sample testing with arbitrarily missing data. arXiv preprint arXiv:2509.20332. 2025.
A. R. Ansari, R. A. Bradley. Rank-Sum Tests for Dispersions. The Annals of Mathematical Statistics, pages 1174–1189, 1960.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.