computePower | R Documentation |
Estimates power for a given sample size, type I error level and number of score components.
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', ncores = NULL)
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 |
ncores |
Number of cores, default NULL. |
Returns a matrix of estimated power for each number of components and tests selected.
Angela Andreella
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.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.