computeSampleSize {powerPLS} | R Documentation |
sample size estimation
Description
Compute optimal sample size calculation
Usage
computeSampleSize(n, X, Y, A, alpha, beta,
nperm, Nsim, seed, test = "R2",...)
Arguments
n |
vector of sample sizes to consider |
X |
data matrix where columns represent the |
Y |
data matrix where columns represent the two classes and
rows the |
A |
number of score components |
alpha |
level of type I error. Default 0.05 |
beta |
level of type II error. Default 0.2. |
nperm |
number of permutations. Default 100. |
Nsim |
number of simulations. Default 100. |
seed |
seed value |
test |
type of test, one of |
... |
Futher parameters. |
Value
Returns a dataframe that contains the estimated power for each sample size and number of components considered
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 <- computeSampleSize(X = datas$X, Y = datas$Y, A = 2, n = 20)