simulate_pls_data: Simulate PLS data

View source: R/simulate_pls_data.R

simulate_pls_dataR Documentation

Simulate PLS data

Description

Simulate a univariate-response PLS dataset using the Li et al.-style generator available in plsRglm.

Usage

simulate_pls_data(n, p, true_ncomp, seed = NULL, model = "li2002")

Arguments

n

Number of observations.

p

Number of predictors.

true_ncomp

True number of latent components.

seed

Optional random seed. If supplied, it is used only for this call.

model

Simulation model. Only "li2002" is currently supported.

Value

A list with components x, y, data, true_ncomp, seed, and model.

Examples

sim <- simulate_pls_data(n = 20, p = 10, true_ncomp = 2, seed = 42)
str(sim)

missPLS documentation built on April 30, 2026, 9:09 a.m.