computePower {powerPLS}R Documentation

Power estimation

Description

estimate power for a given sample size, alpha level and number of score components.

Usage

computePower(X, Y, A, n, seed = 123,
Nsim = 100, nperm = 200, alpha = 0.05,
test = "R2", Y.prob = FALSE, eps = 0.01, ...)

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

test

type of test, one of c("score", "mcc", "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. Default to "R2".

...

Futher parameters see PLSc

Value

Returns the corresponding estimated power

Author(s)

Angela Andreella

References

Andreella, A., Finos, L., Scarpa, B. and Stocchero, M. "Towards a power analysis for PLS-based methods" arXiv:2403.10289 stat.ME.

Examples


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)


[Package powerPLS version 0.1.0 Index]