View source: R/XresidualContrib.R
XresidualContrib | R Documentation |
Generates the squared prediction error (SPE) contributions and graph both mvdareg
and mvdapca
objects.
XresidualContrib(object, ncomp = object$ncomp, obs1 = 1)
object |
an object of class |
ncomp |
the number of components to include in the SPE calculation. |
obs1 |
the observaion in SPE assessment. |
XresidualContrib
is used to generates the squared prediction error (SPE) contributions and graph for both PLS and PCA models. Only one observation at a time is supported.
The output of XresidualContrib
is a matrix of score contributions for a specified observation and the corresponding graph.
Nelson Lee Afanador (nelson.afanador@mvdalab.com)
MacGregor, Process Monitoring and Diagnosis by Multiblock PLS Methods, May 1994 Vol. 40, No. 5 AIChE Journal
data(Penta) mod1 <- plsFit(log.RAI ~., scale = TRUE, data = Penta[, -1], ncomp = 2, validation = "loo") XresidualContrib(mod1, ncomp = 2, obs1 = 3) ## Not run: #PCA Model pc1 <- pcaFit(Penta[, -1], ncomp = 4) XresidualContrib(pc1, ncomp = 3, obs1 = 3) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.