Learn R Programming

ICtest

In linear dimension reduction the data are transformed into components of which only a few are assumed to carry the information of interest, while the remaining ones are considered noise. What makes a component interesting depends on the method. In principal component analysis (PCA) these are the components with large variances, in independent component analysis (ICA) and non-Gaussian component analysis (NGCA) the non-Gaussian components, and in supervised dimension reduction such as sliced inverse regression (SIR) the components which carry information about the response. The package ICtest provides tests and estimates for the number of these interesting, or informative, components, which also explains its name.

Main features

  • Asymptotic tests for PCA (PCAasymp(), PCAlrt() and PCAschott(), the latter also for p > n), for NGCA and ICA (FOBIasymp()) and for SIR (SIRasymp()).
  • Bootstrap tests for the same models (PCAboot(), FOBIboot(), ICSboot() and SIRboot()) and a simulation-based test using non-Gaussian projection pursuit (NGPPsim()).
  • kSearch(), which turns any of the tests into an estimate of the dimension using a forward, backward or binary search.
  • Ladle estimators (PCAladle(), FOBIladle(), SIRladle() and the general ladle()) and predictor augmentation estimators (PCAaug(), FOBIaug() and SIRaug()), including the high-dimensional version PCAaugHD().
  • Plotting methods based on graphics and ggplot2, and the function rorth() for random orthogonal matrices that are uniformly distributed with respect to the Haar measure.

Note that PCAlrt(), PCAaugHD(), FOBIaug() and SIRaug() are so far available only in the development version.

Installation

The released version can be installed from CRAN:

install.packages("ICtest")

The development version can be installed from GitHub:

# install.packages("remotes")
remotes::install_github("klauschN/ICtest")

Example

As an example we consider simulated data with three components whose variances are larger than those of the remaining seven, rotated by a random orthogonal matrix.

library(ICtest)
set.seed(1)
n <- 200
p <- 10
Z <- matrix(rnorm(n * p), ncol = p) %*% diag(c(3, 2.5, 2, rep(1, 7)))
X <- Z %*% t(rorth(p))

A forward search with the asymptotic test for subsphericity estimates the number of interesting components.

kSearch(X, PCAasymp)
#> Results for estimated k = 3:
#> 
#>  PCA subsphericity test using cov
#> 
#> data:  X
#> T = 27.921, df = 27, p-value = 0.415
#> alternative hypothesis: the last 7 eigenvalues are not equal
#> 
#> Tested k values and respective p-values:
#> k = 0, p-value = < 2.2e-16
#> k = 1, p-value = < 2.2e-16
#> k = 2, p-value = < 2.2e-16
#> k = 3, p-value = 0.415

The ladle estimator gives the same answer, and its criterion can be plotted with ggplot2.

pcaLadle <- PCAladle(X)
pcaLadle$k
#> [1] 3
ggladleplot(pcaLadle, main = "", xlab = "k") +
  geom_vline(xintercept = pcaLadle$k, linetype = "dashed") +
  scale_x_continuous(breaks = 0:(p - 1)) + theme_bw()

More examples are given in the vignettes, see vignette(package = "ICtest").

References

The methods are described in the following papers, among others:

  • Nordhausen, K., Oja, H. and Tyler, D.E. (2022). Asymptotic and bootstrap tests for subspace dimension. Journal of Multivariate Analysis, 188, 104830. doi:10.1016/j.jmva.2021.104830
  • Nordhausen, K., Oja, H., Tyler, D.E. and Virta, J. (2017). Asymptotic and bootstrap tests for the dimension of the non-Gaussian subspace. IEEE Signal Processing Letters, 24, 887–891. doi:10.1109/LSP.2017.2696880
  • Luo, W. and Li, B. (2016). Combining eigenvalues and variation of eigenvectors for order determination. Biometrika, 103, 875–887. doi:10.1093/biomet/asw051
  • Luo, W. and Li, B. (2021). On order determination by predictor augmentation. Biometrika, 108, 557–574. doi:10.1093/biomet/asaa077
  • Radojičić, U. and Virta, J. (2025). Dimension estimation in a spiked covariance model using high-dimensional data augmentation. Biometrika, 112, asaf052. doi:10.1093/biomet/asaf052

To cite the package itself, see citation("ICtest"). Bug reports and suggestions are welcome as issues.

Copy Link

Version

Install

install.packages('ICtest')

Monthly Downloads

542

Version

0.3-8

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Klaus Nordhausen

Last Published

November 16th, 2026

Functions in ICtest (0.3-8)

SIRboot

Testing the Subspace Dimension for Sliced Inverse Regression Using Bootstrapping.
SIRladle

Ladle Estimate for SIR
SIRaug

Augmentation Estimate for SIR
PCAladle

Ladle Estimate for PCA
PCAboot

Bootstrap-Based Testing for Subsphericity
PCAaugHD

High-Dimensional Augmentation Estimate for PCA
SIRasymp

Testing the Subspace Dimension for Sliced Inverse Regression.
PCAschott

Testing for Subsphericity using Schott's High-Dimensional Test
PCAlrt

Testing for Subsphericity using the Likelihood Ratio Test
ladleplot

Ladle Plot for an Object of Class ladle
components

Extract Components from 'ictest' and 'ladle' Objects
ggplot.ictest

Scatterplot Matrix for a ictest Object using ggplot2
ggplot.ladle

Scatterplot Matrix for a ladle Object using ggplot2
ggscreeplot

ggplot2-style screeplot
ggscreeplot.ictest

Screeplot for an ictest Object Using ggplot2
covSIR

Supervised Scatter Matrix as Used in Sliced Inverse Regression
rOMEGA

Greek Letter Omega Shaped Bivariate Data Generation
ggladleplot

Ladle Plot for an Object of Class ladle Using ggplot2
rorth

Random Orthogonal Matrix Uniformly Distributed with Respect to the Haar Measure
plot.ictest

Scatterplot Matrix for a ictest Object
summary.kSearch

Summarizing an Object of Class kSearch
screeplot.ictest

Screeplot for an ictest Object
kSearch

Relevant Component Estimation via Iterative Search
summary.ladle

Summarizing an Object of Class ladle
ladle

Ladle estimate for an arbitrary matrix
plot.ladle

Plotting an Object of Class ladle
print.kSearch

Printing an Object of Class kSearch
print.ladle

Printing an Object of Class ladle
rMU

Greek Letter mu Shaped Bivariate Data Generation
NGPPest

Signal Subspace Dimension Testing Using non-Gaussian Projection Pursuit
FOBIaug

Augmentation Estimate for the Number of Gaussian Components in ICA or NGCA using FOBI
PCAasymp

Testing for Subsphericity using the Covariance Matrix or Tyler's Shape Matrix
NGPPsim

Signal Subspace Dimension Testing Using non-Gaussian Projection Pursuit
FOBIladle

Ladle Estimate to Estimate the Number of Gaussian Components in ICA or NGCA
PCAaug

Augmentation Estimate for PCA
NGPP

Non-Gaussian Projection Pursuit
FOBIasymp

Testing for the Number of Gaussian Components in NGCA or ICA Using FOBI
ICSboot

Boostrap-based Testing for the Number of Gaussian Components in NGCA Using Two Scatter Matrices
FOBIboot

Boostrap-based Testing for the Number of Gaussian Components in ICA Using FOBI