| ind_test | R Documentation |
Performs a test of total independence of the components of a multivariate random vector. The test is an L2-type statistic based on characteristic functions, with optional score transformations and resampling-based p-values.
ind_test(X, n.rep = 200, score = "Identity", weight = "Gauss",
strategy = "bootstrap", ncores = NULL, iseed = NULL)
X |
Matrix or data frame of numeric data; rows correspond to observations and columns to variables. |
n.rep |
Number of bootstrap replications or permutations used to approximate the null distribution. |
score |
Score transformation applied marginally to the data:
|
weight |
Weight function used in the L2-type statistic:
|
strategy |
Resampling strategy used to obtain p-values:
|
ncores |
Number of CPU cores to use for resampling computations. If |
iseed |
Optional integer seed for reproducibility of resampling. |
The null hypothesis of the test is that all components of the random vector represented by X
are mutually independent. The test statistic is constructed as an L2-type distance between the
empirical joint characteristic function of the data and the product of the corresponding empirical
marginal characteristic functions.
Score transformations.
The test may be applied directly to the data (score = "Identity") or after marginal score
transformations. With score = "Rank", each marginal variable is replaced by its scaled ranks,
leading to a test that is invariant under strictly increasing marginal transformations and
distribution-free under the null hypothesis. With score = "VdW", van der Waerden (normal)
scores are used to enhance power under a broad class of alternatives.
Weight functions.
The L2-type statistic involves integration with respect to a weight function on the characteristic
function domain. Gaussian and Laplace weights are available via weight.
van der Waerden scores are currently implemented only for Gaussian weights.
P-values via resampling. The null distribution of the test statistic is approximated using resampling:
strategy = "permutation" independently permutes the observations within each variable,
thereby destroying cross-component dependence while preserving marginal distributions.
strategy = "bootstrap" generates a reference distribution using resampling with replacement
under an independence structure.
The p-value is computed as the proportion of resampled statistics at least as large as the observed one.
An object of class "htest" containing:
statistic |
The observed value of the test statistic. |
p.value |
Approximate p-value based on resampling. |
method |
A character string describing the test, including score, weight, and resampling strategy. |
data.name |
Name of the input data |
alternative |
A character string describing the alternative hypothesis (lack of mutual independence). |
parameter |
The number of resampling replicates |
Hallin, M., Meintanis, S.G. and Nordhausen, K. (2024), Consistent distribution free affine invariant tests for the validity of independent component models. arXiv:2404.07632.
icm_test
# in practice, the number of resamples should be much larger
n <- 100
X <- matrix(rnorm(n * 3), ncol = 3)
res <- ind_test(X)
res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.