[R] I need your help about plsr

Andris Jankevics andza at osi.lv
Thu May 7 12:08:14 CEST 2009


Hi,
plsr funtion in pls package are intented for calculation of regression
models. You must define your Y matrix as bianary identification matrix
or You can just use plsda function from R's caret package.

http://caret.r-forge.r-project.org/Classification_and_Regression_Training.html

Best regards,

Andris

On Thu, May 7, 2009 at 11:34 AM, yongkook Kwon <yongkookkwon at gmail.com> wrote:
> Hi, I need your help, so I send letter to you.
>
> I have a problem about plsr in pls package. I want to show how classfied or
> related each ohter samples, so I tried to use plsr and biplot.
>
> But, I failed. Because, I had to change data type of my sample.
> Unfortunately, I didn't know how change data type.
>
> I want you to help me about that.
>
> please, help me.
>
> I show you my sample data , my scripts and error message.
>
> sample data
>> asdf
>  sp mw.1 mw.2 mw.3
> 1  a    1    2    5
> 2  a    2    3    6
> 3  b    3    4    7
> 4  c    4    5    8
> 5  c    5    6    9
>
> My script
> p1=plsr(sp~ .,data=asdf,varidation='CV')
>
> error message
>
> Warning message:
> In model.response(mf, "numeric") :
>  using type="numeric" with a factor response will be ignored
>
> I use korean version R. so I can show origin error message directly.
>
> The error message mean that colMeans(Y) : 'x' is must numerical value.
>
>        [[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.
>




More information about the R-help mailing list