rda (version 1.0.2-2.1)

plot.rdacv: 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 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.

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.

Details

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

References

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

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataCamp Workspace