[R] loadings matrices in plsr vs pcr in pls pacakage

Gavin Simpson gavin.simpson at ucl.ac.uk
Tue Nov 22 20:17:08 CET 2005


On Tue, 2005-11-22 at 08:53 -0400, Roy Little wrote:
> Dear list,
> I have a question concerning the above mentioned methods in the pls 
> package with respect to the loadings matrix produced by the call. In 
> some work I am doing I have found that the values produced are nearly of 
> the same magnitude but of opposite sign. When I use the example data 
> (sensory) I find this result reproduced. I am prepared to work this 
> through but I have a feeling that there could be a possible error in the 
> code. (?!)

But only for the first axis! I am not an expert, but as I understand it,
PCR and PLS are related but different methods. PCR components maximise
variance within the predictor variables, whilst PLS components maximise
the covariance with the response variable. Both methods appear to
extract first components that are similar - perhaps indicative of strong
structure within the data set. That the subsequent components are
different reflects the different criteria maximised by the two methods.

Prof. Ripley has indicated where to look for discussions about the signs
of eigenvectors.

Maybe I misunderstood your query? Were you expecting the results to be
the same on all components? Why do you suspect an error in the code?

HTH,

Gav

> 
> 
>  > sens.pcr$loadings
>             Comp 1      Comp 2     Comp 3    Comp 4
> yellow  75.186621  -0.4780473   3.212149  1.750123
> green  -90.490256   8.5880530   1.634961  1.042239
> brown   -2.861241 -11.3600509 -15.920789 -1.105799
> glossy  13.347090  19.3103902  -3.121693  2.781282
> transp  20.126987  24.0653312  -6.656764 -1.842907
> syrup   -7.199972  -5.3436196  -5.073675  5.620454
>  > sens.pls$loadings
> 
> Loadings:
>         Comp 1  Comp 2  Comp 3  Comp 4
> yellow -74.448 -10.519   3.169  -1.056
> green   88.299  21.627  -0.521  -0.976
> brown    4.959 -14.253 -12.761  -0.371
> glossy -15.798  15.914  -7.574   3.504
> transp -23.049  18.673 -12.214  -2.068
> syrup    8.045  -5.313  -3.698   2.181
> 
> Thank you for your help.
> 
> Roy Little
> Dept. Chem.
> Facultad de Ciencias
> Universidad de los Andes
> MÃ©rida, Venezuela
> 
> ______________________________________________
> R-help at 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
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson                     [T] +44 (0)20 7679 5522
ENSIS Research Fellow             [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC                 [E] gavin.simpsonATNOSPAMucl.ac.uk
UCL Department of Geography       [W] http://www.ucl.ac.uk/~ucfagls/cv/
26 Bedford Way                    [W] http://www.ucl.ac.uk/~ucfagls/
London.  WC1H 0AP.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%




More information about the R-help mailing list