computeSampleSize {powerPLS} | R Documentation |
Sample size estimation
Description
Compute optimal sample size
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 |
Type I error level. Default to 0.05 |
beta |
Type II error level. Default to 0.2. |
nperm |
Number of permutations. Default to 100. |
Nsim |
Number of simulations. Default to 100. |
seed |
Seed value |
test |
Type of test, one of |
... |
Further parameters. |
Value
Returns a data frame that contains the estimated power for each sample size and number of components considered
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
Examples
## Not run:
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, A = 3, n = 20, test = "R2")
## End(Not run)