Learn R Programming

ldstatsHD (version 1.0.1)

thesholdSelection: Threshold selection for equality of correlation matrices test

Description

This function finds the threshold that maximizes an estimate of the power of the exceedances-based test.

Usage

thesholdSelection(D1, D2, useq, deltaA = 3, deltaB = 10, nite = 500, 
                  excAdj = FALSE, alpha = 0.05, paired = TRUE)

Arguments

D1

first population dataset in matrix \(n\times p\) form.

D2

second population dataset in matrix \(n\times p\) form.

useq

sequence of threshold levels to be used.

deltaA

shape hyperparameter for gamma prior distribution of Fisher transform correlation differences in absolute value.

deltaB

scale hyperparameter for gamma prior distribution of Fisher transform correlation differences in absolute value.

nite

number of generated samples.

excAdj

weight for the exceedances test. If excAdj = FALSE the test statistic is given by the squared exceedances. In contrast, If excAdj = TRUE the test statistic is given by the squared of the exceedances minus the threshold.

alpha

null hypothesis rejection level.

paired

if TRUE, observations in D1 and D2 are assumed to be matched (\(n_1\) must be equal to \(n_2\)).

arguments passed to or from other methods to the low level.

Value

Optimal threshold

Details

Details are given in references.

References

To come

Examples

Run this code
# NOT RUN {
#### data
EX2 <- pcorSimulatorJoint(nobs = 50, nclusters = 3, nnodesxcluster = c(40,40,40), 
                          pattern = "pow", diffType = "cluster", dataDepend = "diag", 
                          pdiff=0.5)			               
						 
#### best threshold
useq <- seq(0,qnorm(1-0.01/2),length.out=150)
thesholdSelection(EX2$D1,EX2$D2, useq)

# }

Run the code above in your browser using DataLab