Description Usage Arguments Details Value
For (a grid of) values for a
, nx
and ny
, loocv
calculates the R2 of the joint part. Parallel computing is supported on Windows with package parallel
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
X |
Numeric matrix. Vectors will be coerced to matrix with |
Y |
Numeric matrix. Vectors will be coerced to matrix with |
a |
Vector of integers. Contains the numbers of joint components. |
a2 |
Vector of integers. Contains the numbers of orthogonal components in X. |
b2 |
Vector of integers. Contains the numbers of orthogonal components in Y. |
func |
Function to fit the O2PLS model with. Only |
parall |
Integer. Should a parallel cluster be set up using package |
cl |
Object of class ' |
stripped |
Logical. Use the stripped version of o2m (usually when cross-validating)? |
p_thresh |
Integer. If |
q_thresh |
Integer. If |
tol |
Double. Threshold for which the NIPALS method is deemed converged. Must be positive. |
max_iterations |
Integer. Maximum number of iterations for the NIPALS method. |
The use of this function is to calculate the R2 of the joint part, while varying the number of orthogonal components. Adding more joint components will increase the R2!
A parallelized version is built in -tested on windows-, use package parallel
and set parall=TRUE
to activate this. There should not be already a cluster object with the name cl
.
In case of some error, don't forget to invoke stopCluster(cl)
to end the cluster. See Task Manager (Windows) to verify that the workers are spanned/ended.
See loocv
for more intuition.
Matrix with two rows:
adjR2X |
Contains the joint R2 in X |
adjR2Y |
Contains the joint R2 in Y |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.