MyNixOS website logo
Description

Calibrated Correlation and Two-Sample Tests.

Implementation of corrected two-sample tests. A corrected version of the Pearson and Kendall correlation tests, the Mann-Whitney (Wilcoxon) rank sum test, the Wilcoxon signed rank test and a variance test are implemented. The package also proposes a test for the median and an independence test between two continuous variables of Kolmogorov-Smirnov's type. All these corrected tests are asymptotically calibrated in the sense that the probability of rejection under the null hypothesis is asymptotically equal to the level of the test. See <doi:10.48550/arXiv.2211.08784> for more details on the statistical tests.

robusTest

Implementation of corrected two sample tests for Pearson, Kendall and Spearman correlation tests, corrected Mann-Whitney (Wilcoxon) rank sum test, corrected Wilcoxon signed rank test. A robust variance test, a median test and a test for independence between two continuous variables based on the Kolmogorov-Smirnov's distance are also implemented. All the tests are asymptotically calibrated meaning that the probability of rejection under the null hypothesis is asymptotically equal to the level of the test.

The package contains the functions:

  • cortest that implements the corrected Pearson, Kendall's and Spearman's tests. As compared to the original tests in cor.test which all assume independence between the variables under the null hypothesis, the corrected tests assume that the correlation (of the different types) is equal to 0 under the null.
  • wilcoxtest that implements the corrected version of the Wilcoxon test for two independent samples (which is equivalent to Mann-Whitney in that case) and for two paired samples. In the two independent sample case, as compared to the original test in wilcox.test which assumes that the variables have the same distribution under the null hypothesis, the corrected test assumes under the null that the probability that one variable exceeds the other is equal to 0.5.
  • vartest that implements a variance test based on the Welch correction for the variables (x_i-mean(x))^2 and (y_i-mean(y))^2. As compared to the original test in var.test which only works under the Gaussian scenario, the corrected test works for any distribution of the two variables as long as the fourth order moments exist for both variables. The test can be applied to more than two groups. In the two sample case, the function also returns the confidence interval for the difference of the two variances.
  • mediantest that tests if the median of the random variable (one sample case) or of the difference between two random variables (two sample case) is equal to 0. The test is based on asymptotic results on the rank statistics for the uniform distribution. Confidence intervals for the median (one sample case) or for the difference between two random variables (two sample case) are returned.
  • indeptestthat tests the independence between two continuous variables. The test is based on the maximum distance between the joint empirical cumulative distribution function and the product of the marginals. The distribution of this test has been numerically obtained, the test is exact for all n<=150 and approximated for n>150.
  • tiebreak which randomly breaks ties in vectors, either inside the vector or between two vectors.

The dataset Evans can also be loaded from the robusTest package, this dataset was originally provided in the lbreg package.

Metadata

Version

1.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows