High-Dimensional Location Testing with Normal-Reference Approaches

Provides inverse-free high-dimensional location tests for two-sample and general linear hypothesis testing (GLHT) problems under equal or unequal covariance structures. The package implements classical normal-approximation procedures, scale-invariant procedures, normal-reference procedures based on covariance-matched Gaussian companions, and F-type normal-reference calibrations for heteroscedastic Behrens-Fisher and GLHT settings. Implemented two-sample normal-approximation and scale-invariant procedures include Bai and Saranadasa (1996) < https://www.jstor.org/stable/24306018>, Chen and Qin (2010) , Srivastava and Du (2008) , and Srivastava et al. (2013) . Implemented two-sample normal-reference procedures include Zhang, Guo, Zhou and Cheng (2020) , Zhang, Zhou, Guo and Zhu (2021) , Zhang, Zhu and Zhang (2020) , Zhang, Zhu and Zhang (2023) , Zhang and Zhu (2022) , Zhang and Zhu (2022) , and Zhu, Wang and Zhang (2023) . Implemented GLHT normal-approximation procedures include Fujikoshi et al. (2004) , Srivastava and Fujikoshi (2006) , Yamada and Srivastava (2012) , Schott (2007) , and Zhou, Guo and Zhang (2017) . Implemented GLHT normal-reference procedures include Zhang, Guo and Zhou (2017) , Zhang, Zhou and Guo (2022) , Zhu, Zhang and Zhang (2022) , Zhu and Zhang (2022) , Zhang and Zhu (2022) , and Cao et al. (2024) . The package also includes the random-integration normal-approximation GLHT procedure of Li et al. (2025) . A package-level overview is given in Wang, Zhu and Zhang (2026) .


HDNRA

License:GPL-3.0 R-CMD-check

The R package HDNRA provides inverse-free high-dimensional location tests for two-sample and general linear hypothesis testing (GLHT) problems under equal or unequal covariance structures. It implements classical normal-approximation-based procedures, normal-reference tests based on covariance-matched Gaussian companions, and F-type normal-reference calibrations for heteroscedastic Behrens–Fisher and GLHT settings. Computationally intensive components are implemented in C++ through Rcpp and RcppArmadillo.

Version 2.1.0 contains 24 public testing routines and two real data sets.

Implemented data sets and testing routines

Two real data sets in HDNRA:

Seven normal-reference tests for the two-sample problem:

Seven normal-reference tests for the GLHT/GLHTBF problem:

Four normal-approximation-based tests for the two-sample problem:

Six normal-approximation-based and benchmark tests for the GLHT/GLHTBF problem:

Installation

Install the CRAN release with:

install.packages("HDNRA")

You can also install the development version from GitHub:

# Installing from GitHub requires devtools or remotes.
install.packages("devtools")
# Or:
install.packages("remotes")

# Install the development version from GitHub.
devtools::install_github("nie23wp8738/HDNRA")
# Or:
remotes::install_github("nie23wp8738/HDNRA")

Usage

Load the package

library(HDNRA)

Example data

Package HDNRA comes with two real data sets:

# A COVID-19 transcriptomic data set for the two-sample problem.
?COVID19
data(COVID19)
dim(COVID19)

group1 <- as.matrix(COVID19[c(2:19, 82:87), ])      # healthy controls
group2 <- as.matrix(COVID19[-c(1:19, 82:87), ])     # COVID-19 patients

dim(group1)
dim(group2)

# A corneal topography data set for the GLHT problem.
?corneal
data(corneal)
dim(corneal)

group1 <- as.matrix(corneal[1:43, ])      # normal group
group2 <- as.matrix(corneal[44:57, ])     # unilateral suspect group
group3 <- as.matrix(corneal[58:78, ])     # suspect map group
group4 <- as.matrix(corneal[79:150, ])    # clinical keratoconus group

dim(group1)
dim(group2)
dim(group3)
dim(group4)

Example for the two-sample problem

A simple example using the F-type normal-reference Behrens–Fisher test ZWZ2023.TSBF.2cNRT() with the COVID19 data set:

data("COVID19")

group1 <- as.matrix(COVID19[c(2:19, 82:87), ])
group2 <- as.matrix(COVID19[-c(1:19, 82:87), ])

ZWZ2023.TSBF.2cNRT(group1, group2)

Example for the GLHT problem

A simple example using the F-type normal-reference GLHTBF test WZ2026.GLHTBF.2cNRT() with the corneal data set:

data("corneal")

group1 <- as.matrix(corneal[1:43, ])
group2 <- as.matrix(corneal[44:57, ])
group3 <- as.matrix(corneal[58:78, ])
group4 <- as.matrix(corneal[79:150, ])

Y <- list(group1, group2, group3, group4)
k <- length(Y)
n <- vapply(Y, nrow, integer(1))
p <- ncol(Y[[1]])

# Omnibus one-way contrast against the last group.
G <- cbind(diag(k - 1), rep(-1, k - 1))

WZ2026.GLHTBF.2cNRT(Y, G, n, p)

A rank-one heteroscedastic GLHTBF example can be run with CCXH2024.GLHTBF.2cNRT():

B <- c(-2, 1, 2, -1)
CCXH2024.GLHTBF.2cNRT(Y, B, n, p, alpha = 0.05)

The random-integration normal-approximation GLHTBF routine LHNB2025.GLHTBF.NABT() uses a rank-one coefficient vector and tuning vectors O and A:

B <- c(-2, 1, 2, -1)
A <- rep(sqrt(5) * p^(-3 / 8), p)
eps <- 2
O <- sqrt(eps * (1 + 2 * (1:p) / (3 * p)))

LHNB2025.GLHTBF.NABT(Y, B, O, A, n, p)

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.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("HDNRA")

2.1.0 by Pengfei Wang, 5 months ago


https://github.com/nie23wp8738/HDNRA, https://nie23wp8738.github.io/HDNRA/


Report a bug at https://github.com/nie23wp8738/HDNRA/issues


Browse source code at https://github.com/cran/HDNRA


Authors: Pengfei Wang [aut, cre] , Shuqi Luo [aut] , Tianming Zhu [aut] , Bu Zhou [aut]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports expm, Rcpp, Rdpack, readr, stats, utils

Suggests devtools, dplyr, knitr, rmarkdown, spelling, testthat, tidyr

Linking to Rcpp, RcppArmadillo

System requirements: OpenMP


See at CRAN