Performs the detection of dependence structures algorithm until a cluster is found. This function is the basic building block dependence.structure. Advanced users, might use it directly.
find.cluster(
x,
vec = 1:ncol(x),
list.cdm = cdms(x, vec = vec),
mem = as.numeric(1:max(vec)),
cluster.to.vertex = 1:max(mem),
vertex.to.cdm = 1:max(mem),
previous.n.o.cdms = rep(0, max(mem)),
all.multivariances = numeric(0),
g = igraph::add.vertices(igraph::graph.empty(, directed = FALSE), max(mem), label =
sapply(1:max(mem), function(r) paste(colnames(x, do.NULL = FALSE, prefix = "")[vec ==
r], collapse = ",")), shape = "circle"),
fixed.rejection.level = NA,
alpha = 0.05,
p.adjust.method = "holm",
verbose = TRUE,
kvec = 2:max(mem),
parameter.range = NULL,
type = "conservative",
stop.too.many = NULL,
...
)matrix with the samples
vector, it indicates which columns are initially treated together as one sample
list of doubly centered distance matrices
numeric vector, its length is the number of vertices, its content is the number of the corresponding cluster for the current iteration, i.e., vertex i belongs to cluster mem[i]
vector, contains the cluster to vertex relations, i.e., cluster.to.vertex[i] is the index of the vertex which represents cluster i
vector, contains the vertex to doubly centered distance matrix relations, i.e., vertex.to.cdm[i] is the index of the doubly centered distance matrix in list.cdm which corresponds to vertex i
vector, number of the doubly centered distance matrices in the previous iteration (it is used to ensure that previously check tuples are not checked again)
vector, which contains all distance multivariances which have been calculated so far. Only used to finally return all distance multivariances which have been calculated.
dependence structure graph
vector, if not NA the fixed.rejection.level[k] is used for the k-tuples, instead of a level derived from the significance level alpha
numeric, significance level used for the (distribution-free) tests
name of the method used to adjust the p-values for multiple testing, see p.adjust for all possible options.
boolean, if TRUE details during the detection are printed and whenever a cluster is newly detected the (so far) detected dependence structure is plotted.
vector, k-tuples are only checked for each k in kvec, i.e., for kvec = 2:4 only 2,3 and 4-tuples would be check and then the algorithm stops.
numeric matrix, which hosts the range of significance levels or 'c.factor' which yield the same detected structure
the method for the detection, one of 'conservative','resample','pearson_approx' or 'consistent'.
numeric, upper limit for the number of tested tuples. A warning is issued if it is used. Use stop.too.many = NULL for no limit.
are passed to resample.multivariance in the case of 'type = resample'
For further details see dependence.structure.