Dear list,

I want to calculate SPE (squared prediction error) in x-space, can
someone help?

Here are my codes:

fit.pls<-
plsr(Y~X,data=DAT,ncomp=3,scale=T,method='oscorespls',validation="CV",x=
T) 
actual<-fit.pls$model$X
pred<-fit.pls$scores %*% t(fit.pls$loadings)
SPE.x<-rowSums((actual-pred)^2)

Am I missing something here? 

Thanks in advance. 

Stella Sim



DISCLAIMER:\ This email contains confidential informatio...{{dropped:11}}

______________________________________________
R-help@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.

Reply via email to