sim_XY: Simulate pilot data

View source: R/sim_XY.R

sim_XYR Documentation

Simulate pilot data

Description

Simulate data matrix under the alternative hypothesis with n observations by kernel density estimation

Usage

sim_XY(out, n, seed = 123, post.transformation = TRUE, A, fast = FALSE)

Arguments

out

Output from PLSc

n

Number of observations to simulate

seed

Seed value

post.transformation

Boolean value. Default to TRUE, i.e., post transformation is applied in PLSc

A

Number of score components used in PLSc.

fast

Use the function fk_density from the FKSUM R package for kernel density estimation. Default to FALSE.

Value

Returns a list:

Y_H1

dependent variable, matrix with 2 columns and n rows (observations)

X_H1

predictor variables, matrix with n rows (observations) and number of columns equal to out$X (i.e., original dataset)

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

PLSc, ptPLSc

Examples

datas <- simulatePilotData(nvar = 10, clus.size = c(5,5),m = 6,nvar_rel = 5,A = 2)
out <- PLSc(X = datas$X, Y = datas$Y, A = 3)
out_sim <- sim_XY(out = out, n = 10, A = 3)

powerPLS documentation built on April 4, 2025, 1:57 a.m.