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 p variables and rows the n observations.

Y

data matrix where columns represent the two classes and rows the n observations.

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 c("score", "mcc", "R2"). Default to @R2.

...

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)


[Package powerPLS version 0.1.0 Index]