[R] help with PLSR Loadings

From: Amit Patel <amitrhelp_at_yahoo.co.uk>
Date: Tue, 17 May 2011 18:24:25 +0100 (BST)


Hi

When I call for the loadings of my plsr using the command,

x <- loadings(BHPLS1)

my loadings contain variable names rather than numbers.

>str(x)

 loadings [1:94727, 1:10] -0.00113 -0.03001 -0.00059 -0.00734 -0.02969 ...

Here is the structure of teh data used to conduct plsr

>str(PLSdata)

'data.frame': 40 obs. of 2 variables:  $ GroupingList: int 1 1 1 1 1 1 1 1 1 1 ...  $ PCIList : AsIs [1:40, 1:94727] 42.01749.... 40.85915.... 65.01948....

55.98204.... 61.71673.... ...
  ..- attr(*, "dimnames")=List of 2
  .. ..$ : chr  "X" "X.1" "X.12" "X.13" ...
  .. ..$ : NULL

Because of this I am not able to do a loadings plot

>plot(BHPLS1, "loadings", comps = 1:2, legendpos = "topleft", labels = "numbers",
>xlab = "nm")


Error in loadingplot.default(x, ...) :
  Could not convert variable names to numbers.

What am I doing wrong

Thanks in advance

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 17 May 2011 - 17:27:10 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 18 May 2011 - 08:20:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive