Learn R Programming

snazzieR (version 0.1.2)

pls.summary: Format PLS Model Output as LaTeX Tables

Description

Formats and displays Partial Least Squares (PLS) model output from pls.regression() as LaTeX tables for PDF rendering.

Usage

pls.summary(x, ..., include.scores = TRUE)

Value

Returns a knitr::asis_output object (LaTeX code) for PDF rendering.

Arguments

x

A list returned by pls.regression() (class "pls") containing PLS model components.

...

Further arguments passed to or from methods (unused).

include.scores

Logical. Whether to include score matrices (T and U). Default is TRUE.

Examples

Run this code
# Load example data
data(mtcars)

# Prepare data for PLS regression
X <- mtcars[, c("wt", "hp", "disp")]
Y <- mtcars[, "mpg", drop = FALSE]

# Fit PLS model with 2 components
pls.fit <- pls.regression(X, Y, n.components = 2)

# Print a LaTeX-formatted summary
pls.summary(pls.fit, include.scores = FALSE)

Run the code above in your browser using DataLab