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

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Nov 22 18:41:21 CET 2005


Please read ?princomp to understand more about loadings and their 
arbitrary signs.

On Tue, 22 Nov 2005, 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. (?!)
>
>
>
> > 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.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list