MyNixOS website logo
Description

High-Dimensional Location Testing with Normal-Reference Approaches.

We provide a collection of various classical tests and latest normal-reference tests for comparing high-dimensional mean vectors including two-sample and general linear hypothesis testing (GLHT) problem. Some existing tests for two-sample problem [see Bai, Zhidong, and Hewa Saranadasa.(1996) <https://www.jstor.org/stable/24306018>; Chen, Song Xi, and Ying-Li Qin.(2010) <doi:10.1214/09-aos716>; Srivastava, Muni S., and Meng Du.(2008) <doi:10.1016/j.jmva.2006.11.002>; Srivastava, Muni S., Shota Katayama, and Yutaka Kano.(2013)<doi:10.1016/j.jmva.2012.08.014>]. Normal-reference tests for two-sample problem [see Zhang, Jin-Ting, Jia Guo, Bu Zhou, and Ming-Yen Cheng.(2020) <doi:10.1080/01621459.2019.1604366>; Zhang, Jin-Ting, Bu Zhou, Jia Guo, and Tianming Zhu.(2021) <doi:10.1016/j.jspi.2020.11.008>; Zhang, Liang, Tianming Zhu, and Jin-Ting Zhang.(2020) <doi:10.1016/j.ecosta.2019.12.002>; Zhang, Liang, Tianming Zhu, and Jin-Ting Zhang.(2023) <doi:10.1080/02664763.2020.1834516>; Zhang, Jin-Ting, and Tianming Zhu.(2022) <doi:10.1080/10485252.2021.2015768>; Zhang, Jin-Ting, and Tianming Zhu.(2022) <doi:10.1007/s42519-021-00232-w>; Zhu, Tianming, Pengfei Wang, and Jin-Ting Zhang.(2023) <doi:10.1007/s00180-023-01433-6>]. Some existing tests for GLHT problem [see Fujikoshi, Yasunori, Tetsuto Himeno, and Hirofumi Wakaki.(2004) <doi:10.14490/jjss.34.19>; Srivastava, Muni S., and Yasunori Fujikoshi.(2006) <doi:10.1016/j.jmva.2005.08.010>; Yamada, Takayuki, and Muni S. Srivastava.(2012) <doi:10.1080/03610926.2011.581786>; Schott, James R.(2007) <doi:10.1016/j.jmva.2006.11.007>; Zhou, Bu, Jia Guo, and Jin-Ting Zhang.(2017) <doi:10.1016/j.jspi.2017.03.005>]. Normal-reference tests for GLHT problem [see Zhang, Jin-Ting, Jia Guo, and Bu Zhou.(2017) <doi:10.1016/j.jmva.2017.01.002>; Zhang, Jin-Ting, Bu Zhou, and Jia Guo.(2022) <doi:10.1016/j.jmva.2021.104816>; Zhu, Tianming, Liang Zhang, and Jin-Ting Zhang.(2022) <doi:10.5705/ss.202020.0362>; Zhu, Tianming, and Jin-Ting Zhang.(2022) <doi:10.1007/s00180-021-01110-6>; Zhang, Jin-Ting, and Tianming Zhu.(2022) <doi:10.1016/j.csda.2021.107385>].

HDNRA

License:GPL-3.0 Codecov testcoverage R-CMD-check

The R package HDNRA includes the latest methods based on normal-reference approach to test the equality of the mean vectors of high-dimensional samples with possibly different covariance matrices. HDNRA is also used to demonstrate the implementation of these tests, catering not only to the two-sample problem, but also to the general linear hypothesis testing (GLHT) problem. This package provides easy and user-friendly access to these tests. Both coded in C++ to allow for reasonable execution time using Rcpp. Besides Rcpp, the package has no strict dependencies in order to provide a stable self-contained toolbox that invites re-use.

There are two real data sets in HDNRA: COVID19 and corneal.

Seven normal-reference tests for the two-sample problem: ts_zgzc2020(), ts_zz2022(), ts_zzz2020(), tsbf_zwz2023(), tsbf_zz2022(), tsbf_zzgz2021(), tsbf_zzz2023().

Five normal-reference tests for the GLHT problem in HDNRA: glht_zgz2017(), glht_zz2022(), glht_zzz2022(), glhtbf_zz2022(), glhtbf_zzg2022().

Four existing tests for the two-sample problem in HDNRA: ts_bs1996(), ts_sd2008(), tsbf_cq2010(), tsbf_skk2013().

Five existing tests for the GLHT problem in HDNRA: glht_fhw2004(), glht_sf2006(), glht_ys2012(), glhtbf_zgz2017(), ks_s2007().

Installation

You can install and load the most recent development version of HDNRA from GitHub with:

# Installing from GitHub requires you first install the devtools or remotes package
install.packages("devtools")
# Or
install.packages("remotes")

# install the most recent development version from GitHub
devtools::install_github("nie23wp8738/HDNRA")
# Or
remotes::install_github("nie23wp8738/HDNRA")
# load the most recent development version from GitHub
library(HDNRA)

Usage

Load the package

library(HDNRA)

Example data

Package HDNRA comes with two real data sets:

# A COVID19 data set from NCBI with ID GSE152641.
?COVID19

# A corneal data set acquired during a keratoconus study.
?corneal

Example for two-sample problem

A simple example of how to use one of the normal-reference tests tsbf_zwz2023 using data set COVID19:

data("COVID19")
group1 <- as.matrix(COVID19[c(2:19, 82:87), ]) # healthy group1
group2 <- as.matrix(COVID19[-c(1:19, 82:87), ]) # patients group2
# The data matrix for tsbf_zwz2023 should be p by n, sometimes we should transpose the data matrix
tsbf_zwz2023(t(group1), t(group2))
#> 
#> 
#> 
#> data:  
#> statistic = 4.1877, df1 = 2.7324, df2 = 171.7596, p-value = 0.008673

Example for GLHT problem

A simple example of how to use one of the normal-reference tests glhtbf_zzg2022 using data set corneal:

data("corneal")
p <- dim(corneal)[2]
k <- 4
Y <- list()
group1 <- as.matrix(corneal[1:43, ]) # normal
group2 <- as.matrix(corneal[44:57, ]) # unilateral suspect
group3 <- as.matrix(corneal[58:78, ]) # suspect
group4 <- as.matrix(corneal[79:150, ]) # clinical leratoconus
Y[[1]] <- t(group1)
Y[[2]] <- t(group2)
Y[[3]] <- t(group3)
Y[[4]] <- t(group4)
dim(Y[[1]])
#> [1] 2000   43
dim(Y[[2]])
#> [1] 2000   14
dim(Y[[3]])
#> [1] 2000   21
dim(Y[[4]])
#> [1] 2000   72
n <- c(43, 14, 21, 72)
G <- cbind(diag(k - 1), rep(-1, k - 1))
glhtbf_zzg2022(Y, G, n, p)
#> 
#> 
#> 
#> data:  
#> statistic = 159.73, df = 6.1652, beta = 6.1464, p-value = 0.0002577

Code of Conduct

Please note that the HDNRA project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Metadata

Version

1.0.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