Re: [R] R2 function from PLS to use a model on test data

2010-08-03 Thread Bjørn-Helge Mevik
Addi Wei writes: > Hello, >I am having some trouble using a model I created from plsr (of train) to > analyze each invididual R^2 of the 10 components against the test data. For > example: > > mice1 <- plsr(response ~factors, ncomp=10 data=MiceTrain) > R2(mice1)##this provides the corr

Re: [R] R2 function from PLS to use a model on test data

2010-07-08 Thread Addi Wei
I figured out the answer. Since I have both the predicted and actual values, I simply need to call the lm function, and summary to see R^2 which matches what MOE provided. myline.fit <-lm( y~x) summary(myline.fit) -- View this message in context: http://r.789695.n4.nabble.com/R2-function-fro

[R] R2 function from PLS to use a model on test data

2010-07-07 Thread Addi Wei
Hello, I am having some trouble using a model I created from plsr (of train) to analyze each invididual R^2 of the 10 components against the test data. For example: mice1 <- plsr(response ~factors, ncomp=10 data=MiceTrain) R2(mice1)##this provides the correct R2 for the Train data for 1