Generates a score contribution plot

Share:

Description

Generates a the Score Contribution Graph both mvdareg and mvdapca objects.

Usage

1
ScoreContrib(object, obs1 = 1, obs2 = NULL)

Arguments

object

an object of class mvdareg or mvdapca.

obs1

the first observaion(s) in the score(s) comparison.

obs2

the second observaion(s) in the score(s) comparison.

Details

ScoreContrib is used to generates the score contributions for both PLS and PCA models. Up to two groups of score(s) can be selected. If only one group is selected, the contribution is measured to the model average. For PLS models the PCA loadings are replaced with the PLS weights.

Value

The output of ScoreContrib is a matrix of score contributions for the specified observation(s).

Author(s)

Nelson Lee Afanador (nelson.afanador@mvdalab.com)

References

MacGregor, Process Monitoring and Diagnosis by Multiblock PLS Methods, May 1994 Vol. 40, No. 5 AIChE Journal.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(Penta)
## Number of bootstraps set to 500 to demonstrate flexibility
## Use a minimum of 1000 (default) for results that support bootstraping
mod1 <- plsFit(log.RAI ~., scale = TRUE, data = Penta[, -1], 
               ncomp = 2, validation = "oob", boots = 500)
Score.Contributions1 <- ScoreContrib(mod1, obs1 = 1, obs2 = 3)
plot(Score.Contributions1)
Score.Contributions2 <- ScoreContrib(mod1, obs1 = c(1, 3), obs2 = c(5:10))
plot(Score.Contributions2)

#PCA Model
pc1 <- pcaFit(Penta[, -1])
Score.Contributions1 <- ScoreContrib(pc1, obs1 = 1, obs2 = 3)
plot(Score.Contributions1)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.