plot.cp: Plotting Function for Score Contributions.

Description Usage Arguments Details Value Author(s) Examples

View source: R/plot.cp.R

Description

This function generates a plot an object of class score.contribution

Usage

1
2
## S3 method for class 'cp'
plot(x, ncomp = "Overall", ...)

Arguments

x

score.contribution object

ncomp

the number of components to include the graph output.

...

additional arguments. Currently ignored.

Details

A graph of the score contributions for ScoreContrib objects.

Value

The output of plot is a graph of score contributions for the specified observation(s).

Author(s)

Nelson Lee Afanador ([email protected])

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
data(Penta)
mod1 <- plsFit(log.RAI ~., scale = TRUE, data = Penta[, -1],
               ncomp = 2, method = "bidiagpls", validation = "loo")
Score.Contributions1 <- ScoreContrib(mod1, obs1 = 1, obs2 = 3)
plot(Score.Contributions1, ncomp = 1)

## Not run: 
data(Penta)
## Number of bootstraps set to 300 to demonstrate flexibility
## Use a minimum of 1000 (default) for results that support bootstraping
mod2 <- plsFit(log.RAI ~., scale = TRUE, data = Penta[, -1],
               ncomp = 2, validation = "oob", boots = 300)
Score.Contributions2 <- ScoreContrib(mod2, obs1 = 1, obs2 = 3)
plot(Score.Contributions2, ncomp = 1)

## End(Not run)

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

mvdalab documentation built on Oct. 4, 2017, 5:06 p.m.