computePower {powerPLS}R Documentation

Power estimation

Description

Estimates power for a given sample size, type I error level and number of score components.

Usage

computePower(X, Y, A, n, seed = 123,
Nsim = 100, nperm = 200, alpha = 0.05,
scaling = "auto-scaling", test = "R2",
Y.prob = FALSE, eps = 0.01, post.transformation = TRUE,
fast=FALSE,transformation = "clr")

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.

A

Number of score components

n

Sample size

seed

Seed value

Nsim

Number of simulations

nperm

Number of permutations

alpha

Type I error level

scaling

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

test

Type of test statistic, one of c("score", "mcc", "R2"). Default to "R2".

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.

post.transformation

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

fast

Use the function fk_density from the FKSUM R package for kernel density estimation. Default to FALSE.

transformation

Transformation used to map Y in probability data vector. The options are "ilr" and "clr".

Value

Returns a matrix of estimated power for each number of components and tests selected.

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.

Examples

## Not run: 
datas <- simulatePilotData(nvar = 10, clus.size = c(5,5),m = 6,nvar_rel = 5,A = 2)
out <- computePower(X = datas$X, Y = datas$Y, A = 3, n = 20, test = "R2")

## End(Not run)

[Package powerPLS version 0.2.0 Index]