Have a look this website
http://www.maths.bath.ac.uk/~jjf23/LMR/errata.html
p139, package
pls.pcr has been replaced with package
pls in more recent versions of R. Last paragraph is now: The
pls package can compute this CV. By default, the data is divided into ten parts for the CV: > pcrmod <- pcr(fat ~ ., data=meatspec[1:172,], validation="CV",ncomp=50)> validationplot(pcrmod)p140,
validationplot() above produces a slightly different plot for the right panel of Figure 9.5. p141, The
plsr() function now centers the predictors internally. So first sentence can now read "We now compute the PLS on all models up to size 50". The next chunk of R code becomes: > plsg <- plsr(fat ~ ., data=meatspec[1:172,], ncomp=50, validation="CV")> coefplot(plsg,ncomp=4,xlab="Frequency")> validationplot(plsg)The centering described in the last two sentences of p141 is now redundant. Last chunk of R code becomes: > ypred <- predict(plsg,ncomp=14)> rmse(ypred,meatspec$fat[1:172])p142, chunk of R code becomes: > ytpred <- predict(plsg,meatspec[173:215,],ncomp=14)> rmse(ytpred,meatspec$fat[173:215])Note also that Figure 9.7 is somewhat changed by using the plotting functions from the
pls package.