Re: [R] help plsr function

2014-06-24 Thread cindy Guo
Ok, yes, I can match them now. Thank you very much! On Tue, Jun 24, 2014 at 3:58 AM, Bjørn-Helge Mevik wrote: > annie Zhang writes: > > > ## the predicted scores from the model > > (pred <- predict(data.cpls,n.comp=1:2,newdata=x.new,type="score")) > > ## the predicted scores using x%*%projec

Re: [R] help plsr function

2014-06-24 Thread Bjørn-Helge Mevik
annie Zhang writes: > ## the predicted scores from the model > (pred <- predict(data.cpls,n.comp=1:2,newdata=x.new,type="score")) > ## the predicted scores using x%*%projection > cbind(x.new.centered%*%data.cpls$projection[,1],x.new.centered%*%data.cpls$projection[,2]) > > Can someone please tell

[R] help plsr function

2014-06-23 Thread annie Zhang
Hi All, I want to produce scores from X using $projection. When I predict, I cannot match the predicted scores and scores using x%*%projection. Below is a very simple example, set.seed(seed=1) y <- c(1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0) x <- matrix(runif(200),nrow=20) data