R: A function that plots the result from rda.cv

plot.rdacv {rda} | R Documentation

## A function that plots the result from rda.cv

### Description

Plot the cross validation error matrix and the number of shrunken gene matrix obtained from RDA cross-validation analysis.

### Usage

    ## S3 method for class 'rdacv'
    plot(x, type=c("both", "error", "gene"), nice=FALSE, ...)

### Arguments

`x` | The fit from `rda.cv`.
`type` | A character string specifying what to plot. If 'both', then heatmaps for both cv error and shrunken genes are plotted; if 'error', only the error map is produced; if 'gene', only the gene map is produced. This option is useful if users want to generate a specific plot. Default is 'both'.
`nice` | A logical flag. If 'TRUE', then 1-dim curves are plotted instead of heatmaps. This is useful when the length of alpha or delta is small. Heatmap in this case can be awful-looking. For example, if alpha=0.5 is a single value, while delta=seq(10), then both cv error and shrunken genes will be plotted as a 1-dim function of delta or vice versa when the length of delta is small.
`...` | Additional arguments for generic plot.

### Details

`plot.rdacv` produces two heatmaps for the cross validation error matrix and the number of shrunken genes matrix obtained from `rda.cv`.

### Value

A list of returning values:

`one.se.pos` | A 2-column matrix of the positions of the one standard error boundary points on the CV error heatmap. The first column indicates the alpha positions and the second column for the delta positions.
`min.cv.pos` | A 2-column matrix of the positions of the minimal CV error points on the CV error heatmap. The first column indicates the alpha positions and the second column for the delta positions.

### Author(s)

Yaqian Guo, Trevor Hastie and Robert Tibshirani

### References

Guo, Y. et al. (2004) Regularized Discriminant Analysis and Its Application in Microarrays, Technical Report, Department of Statistics, Stanford University.

### Examples

    data(colon)
    fit <- rda(t(colon.x), colon.y)
    fit.cv <- rda.cv(fit, x=t(colon.x), y=colon.y)
    plot.rdacv(fit.cv)

[Package rda version 1.0.2-2.1 Index]