[R] PLS: problem transforming scores to variable space
Bjørn-Helge Mevik
bhx2 at mevik.net
Fri Jul 15 13:21:54 CEST 2005
rainer grohmann writes:
> However, when I try to map the scores back to variable space, I ran into
> problems:
[...]
> cbind(t$scores[,1],(t$scores%*%(t$loadings)%*%t$projection)[,1])
You need to transpose the loadings:
> all.equal(unclass(t$scores),
+ t$scores %*% t(t$loadings) %*% t$projection)
[1] TRUE
(A tip: Since 't' is used for transposing, it is usually a Good
Thing(TM) to avoid using it as a varable name.)
--
Bjørn-Helge Mevik
More information about the R-help
mailing list