Error raised when one of the columns of the target matrix Y is constant
Opened this issue · 0 comments
camilaagw commented
When one of the columns of the target matrix Y is constant the following error is raised both for plsca
and plsreg2
:
Error in if (ah.dif < 1e-06 || iter == 100) break :
missing value where TRUE/FALSE needed
The following code snippet will allow to reproduce this:
data(linnerud)
X = linnerud[4:6]
Y = linnerud[1:3]
Y[,2] = 1
plsreg2(X, Y)
plsca(X, Y)
Is this behaviour expected?