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 |
Y |
data matrix where columns represent the two classes and
rows the |
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 |
Y.prob |
Boolean value. Default @FALSE. IF @TRUE |
eps |
Default 0.01. |
... |
Futher parameters see |
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)