dQ2Test: dQ2 test

View source: R/dQ2Test.R

dQ2TestR Documentation

dQ2 test

Description

Performs permutation-based test based on dQ2

Usage

dQ2Test(X, Y, nperm = 200, A, randomization = FALSE,
Y.prob = FALSE, eps = 0.01, scaling = 'auto-scaling',
post.transformation = TRUE, class = 1, cross.validation = FALSE, ...)

Arguments

X

data matrix where columns represent the p variables and rows the n observations.

Y

data matrix where columns represent the two classes and rows the n observations.

nperm

number of permutations. Default to 200.

A

number of score components

randomization

Boolean value. Default to FALSE. If TRUE the permutation p-value is computed

Y.prob

Boolean value. Default FALSE. IF TRUE Y is a probability vector

eps

Default 0.01. eps is used when Y.prob = FALSE to transform Y in a probability vector

scaling

Type of scaling, one of c('auto-scaling', 'pareto-scaling', 'mean-centering'). Default 'auto-scaling'.

post.transformation

Boolean value. TRUE if you want to apply post transformation. Default TRUE

class

Numeric value. Specifiy the reference class. Default 1

cross.validation

Boolean value. Default FALSE. TRUE if you want to compute the observed test statistic by Nested cross-validation

...

additional arguments related to cross.validation. See repeatedCV_test

Value

List with the following objects:

pv

raw p-value. It equals NA if randomization = FALSE

pv_adj

adjusted p-value. It equals NA if randomization = FALSE

test

estimated test statistic

Author(s)

Angela Andreella

References

For the general framework of power analysis for PLS-based methods see:

Andreella, A., Fino, L., Scarpa, B., & Stocchero, M. (2024). Towards a power analysis for PLS-based methods. arXiv preprint https://arxiv.org/abs/2403.10289.

See Also

Other test statistics implemented: mccTest, scoreTest, sensitivityTest, specificityTest,AUCTest, R2Test, FMTest, F1Test.

Examples

datas <- simulatePilotData(nvar = 30, clus.size = c(5,5),m = 6,nvar_rel = 5,A = 1)
out <- dQ2Test(X = datas$X, Y = datas$Y, A = 1)
out

powerPLS documentation built on April 4, 2025, 1:57 a.m.