Hi,
I think a got it. In plsda code, line 604. Matrix B.hat isn’t it?
Is this expression to calculate coefficient regression equivalent to Bpls= (W(P’W)^-1)Q’ ??
where Q is Y-loadings, W is X-weights, P’ is X-loadings
B.hat[[i]] = sapply(1 : ncomp[i], function(x){Wmat[, 1:x] %% solve(t(Pmat[, 1:x]) %% Wmat[, 1:x]) %*% t(Cmat)[1:x, ]}, simplify = “array”)
Thanks
Enzo