plot: Plot objects from SUPCAVS package

Description Usage Arguments Note Examples

View source: R/plot.R

Description

The plot function has two signatures: one receive a object generated by the performance test function, the other receive a list of this objects. This last function lets the user to see more then one graphic.

Usage

1
plot(x, ...)

Arguments

x

A object obtained from performance test function. In case of plot for a list, x is a list with a lot of objects of type performance test.

...

Any other parameter that can be passed to default print function.

Note

The example below shows a plot of performance. This plot shows the performance of the model at y axis and the number of selected variables (a) at x axis. Over each point is a number (b) indicating how much variables were eliminated from the data set in a way that summing the (a) with (b), we have the number of variables in the original data set.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  x = as.data.frame(matrix(rnorm(1000), 
                    100, 10,
                    dimnames=list(NULL, paste('X', 1:10, sep=''))))
                    
  y = rowSums(x) + rnorm(100);
  
  s1 = pcavs(x, y, 2, 5)
  s2 = spcavs(x, y, 2, 5)
  
  p1 = modelPerformance(s1)
  p2 = modelPerformance(s2)
  
  plot(p1)
  plot(p2)
  
  # plot.list
  plot(list(p1,p2))

juscelino-izidoro/supcavs documentation built on Jan. 2, 2022, 7:49 a.m.