plot.vip: Plotting function for Variable Importance in the Projection

Description Usage Arguments Details Value Author(s) Examples

View source: R/plot.vip.R

Description

This function generates a plot an object of class vip.

Usage

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

Arguments

x

vip object

ncomp

the number of components to include the graph output.

...

additional arguments. Currently ignored.

Details

plot.vip is used to generates the graph of the variable in the projection from vip objects.

Value

The output of plot.vip is a graph of the variable importance in the projection.

Author(s)

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

Examples

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

## 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)
VIP2 <- vip(mod2, conf = .95)
plot(VIP2)

## End(Not run)

###  PLS MODEL FIT WITH method = 'wrtpls' and validation = 'none', i.e. WRT-PLS is performed ###
## Not run: 
mod3 <- plsFit(Sepal.Length ~., scale = TRUE, data = iris,
               method = "wrtpls", validation = "none") #ncomp is ignored
plot(vip(mod3), ncomp = 1:2)

## End(Not run)

mvdalab documentation built on May 30, 2017, 2:40 a.m.

Search within the mvdalab package
Search all R packages, documentation and source code