Re: [R] PLS: problem transforming scores to variable space

From: Bjørn-Helge Mevik <bhx2_at_mevik.net>
Date: Fri 15 Jul 2005 - 21:21:54 EST

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

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Jul 15 21:26:24 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:45 EST