Computes orthogonal scores partial least squares (opls) regressions with the NIPALS algorithm. It allows multiple response variables. It does not return the variance information of the components. NOTE: For internal use only!
opls_gs(Xr,
Yr,
Xu,
ncomp,
scale,
response = FALSE,
reconstruction = TRUE,
similarity = TRUE,
fresponse = TRUE,
algorithm = "pls")
a list containing the following elements:
ncomp
: the number of components.
pred_response
: the response predictions for Xu
.
rmse_reconstruction
: the rmse of the reconstruction for Xu
.
score_dissimilarity
: the distance score between Xr
and Xu
.
a matrix of predictor variables for the training set.
a matrix of a single response variable for the training set.
a matrix of predictor variables for the test set.
the number of pls components.
logical indicating whether X
must be scaled.
logical indicating whether to compute the prediction of Yu
.
logical indicating whether to compute the reconstruction error of Xu
.
logical indicating whether to compute the the distance score between Xr
and Xu
(in the pls space).
logical indicating whether to compute the score of the variance not explained for Yu
.
(for weights computation) a character string indicating
what method to use. Options are:
'pls'
for pls (using covariance between X and Y) or
'mpls'
for modified pls (using correlation between X and Y).
Leonardo Ramirez-Lopez