# pARI: Permutation-based All-Resolutions Inference In angeella/ARIpermutation: Permutation-Based All-Resolutions Inference Method

## Description

The main function for All-Resolutions Inference (ARI) method based on critical vectors constructed using the p-values permutation distribution. The function computes simultaneous lower bounds for the number of true discoveries for each set of hypotheses specified in ix controlling family-wise error rate.

## Usage

 1 2 3 pARI(X= NULL, ix, alpha = 0.05, family = "simes", delta = 0, B = 1000, pvalues = NULL, test.type = "one_sample", complete = FALSE, clusters = FALSE, iterative = FALSE, approx = TRUE, ncomb = 100, step.down = FALSE, max.step = 10, ...) 

## Arguments

 X data matrix where rows represent the m variables and columns the n observations. ix numeric vector which expresses the set of hypotheses of interest. It can be a vector with length equals m indicating the corresponding cluster for each variable, (in this case, you must put clusters = TRUE), or a vector containing the position indices of the variables of interest if only one set/cluster of hypotheses is considered. alpha numeric value in '[0,1]'. It expresses the alpha level to control the family-wise error rate. family string character. Choose a family of confidence envelopes to compute the critical vector from "simes", "aorc", "beta" and "higher.criticism".#' @param alpha alpha level. delta numeric value. It expresses the delta value, please see the references. Default to 0. B numeric value. Number of permutations, default to 1000. pvalues matrix of pvalues with dimensions m \times B used instead of the data matrix X. Default to @NULL. test.type character string. Choose a type of tests among "one_sample", i.e., one-sample t-test, or "two_samples", i.e., two-samples t-tests. Default "one_sample". complete Boolean value. If TRUE the sets of critical vectors and the raw pvalues are returned. Default @FALSE. clusters Boolean value. If ix indicates many clusters/sets must be TRUE. Default @FALSE. iterative Boolean value. If iterative = TRUE, the iterative method for improvement of confidence envelopes is applied. Default @FALSE. approx Boolean value. Default @TRUE. If you are treating high dimensional data, we suggest to put approx = TRUE to speed up the computation time. ncomb Numeric value. If approx = TRUE, you must decide how many random subcollections (level of approximation) considered. step.down Boolean value. Default @FALSE If you want to compute the lambda calibration parameter using the step-down approach put TRUE. max.step Numeric value. Default to 10. Maximum number of steps for the step down approach, so useful when step.down = TRUE. ... Futher parameters.

## Value

by default returns a list with the following objects: discoveries: lower bound for the number of true discoveries in the set selected, ix: selected variables. If complete = TRUE the raw pvalues and cv critical vector are returned.

Angela Andreella

## References

For the general framework of All-Resolutions Inference see:

Goeman, Jelle J., and Aldo Solari. "Multiple testing for exploratory research." Statistical Science 26.4 (2011): 584-597.

For permutation-based All-Resolutions Inference see:

Andreella, Angela, et al. "Permutation-based true discovery proportions for fMRI cluster analysis." arXiv preprint arXiv:2012.00368 (2020).

The type of tests implemented: signTest permTest.
 1 2 3 datas <- simulateData(pi0 = 0.8, m = 1000, n = 30, power = 0.9, rho = 0,seed = 123) out <- pARI(X = datas, ix = c(1:200),test.type = "one_sample") out