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
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
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
3 matches
Mail list logo