| plsc | R Documentation |
Reference implementation of symmetric brain-behavior PLS (a.k.a. Behavior PLSC).
It finds paired weight vectors for X and Y that maximize their cross-block
covariance, obtained from the SVD of the cross-covariance (or correlation)
matrix C_{XY} = X^\top Y / (n-1).
plsc(
X,
Y,
ncomp = NULL,
preproc_x = standardize(),
preproc_y = standardize(),
...
)
X |
Numeric matrix of predictors (n x p_x). |
Y |
Numeric matrix of outcomes/behaviors (n x p_y). Must have the same
number of rows as |
ncomp |
Number of latent variables to return. Defaults to
|
preproc_x |
Preprocessor for the X block (default: |
preproc_y |
Preprocessor for the Y block (default: |
... |
Extra arguments stored on the returned object. |
A cross_projector with class "plsc" containing
vx, vy: X and Y loading/weight matrices.
sx, sy: subject scores for X and Y blocks.
singvals: singular values of C_{XY} (strength of each LV).
explained_cov: proportion of cross-block covariance per LV.
preproc_x, preproc_y: fitted preprocessors for reuse.
set.seed(1)
X <- matrix(rnorm(80), 20, 4)
Y <- matrix(rnorm(60), 20, 3)
fit <- plsc(X, Y, ncomp = 3)
fit$singvals
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.