% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate_pls_data.R
\name{simulate_pls_data}
\alias{simulate_pls_data}
\title{Simulate PLS data}
\usage{
simulate_pls_data(n, p, true_ncomp, seed = NULL, model = "li2002")
}
\arguments{
\item{n}{Number of observations.}

\item{p}{Number of predictors.}

\item{true_ncomp}{True number of latent components.}

\item{seed}{Optional random seed. If supplied, it is used only for this call.}

\item{model}{Simulation model. Only \code{"li2002"} is currently supported.}
}
\value{
A list with components \code{x}, \code{y}, \code{data}, \code{true_ncomp}, \code{seed}, and
\code{model}.
}
\description{
Simulate a univariate-response PLS dataset using the Li et al.-style
generator available in \code{plsRglm}.
}
\examples{
sim <- simulate_pls_data(n = 20, p = 10, true_ncomp = 2, seed = 42)
str(sim)
}
