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 |
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 level |
scaling |
Type of scaling, one of
|
test |
Type of test statistic, one of |
Y.prob |
Boolean value. Default |
eps |
Default 0.01. |
post.transformation |
Boolean value. |
fast |
Use the function |
transformation |
Transformation used to map |
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)