viz_wrap: Plot Envelopes

viz_wrapR Documentation

Plot Envelopes

Description

Plot Envelopes

Usage

viz_hull(x, ...)

viz_confidence(x, ...)

viz_tolerance(x, ...)

## S4 method for signature 'MultivariateAnalysis'
viz_tolerance(x, ..., margin = 1, axes = c(1, 2), group = NULL, level = 0.95)

## S4 method for signature 'BootstrapCA'
viz_tolerance(x, ..., margin = 1, axes = c(1, 2), level = 0.95)

## S4 method for signature 'MultivariateAnalysis'
viz_confidence(x, ..., margin = 1, axes = c(1, 2), group = NULL, level = 0.95)

## S4 method for signature 'BootstrapCA'
viz_confidence(x, ..., margin = 1, axes = c(1, 2), level = 0.95)

## S4 method for signature 'MultivariateAnalysis'
viz_hull(x, ..., margin = 1, axes = c(1, 2), group = NULL)

## S4 method for signature 'BootstrapCA'
viz_hull(x, ..., margin = 1, axes = c(1, 2))

Arguments

x

An object from which to wrap observations (a CA, MCA or PCA object).

...

Further graphical parameters to be passed to graphics::polygon().

margin

A length-one numeric vector giving the subscript which the data will be returned: 1 indicates individuals/rows (the default), 2 indicates variables/columns.

axes

A length-two numeric vector giving the dimensions to be for which to compute results.

group

A vector specifying the group an observation belongs to.

level

A numeric vector specifying the confidence/tolerance level.

Value

⁠viz_*()⁠is called for its side-effects: it results in a graphic being displayed. Invisibly returns x.

Author(s)

N. Frerebeau

See Also

Other plot methods: biplot(), screeplot(), viz_contributions(), viz_individuals(), viz_variables(), wrap

Examples

## Load data
data("iris")

## Compute principal components analysis
X <- pca(iris, scale = TRUE)

## Convex hull coordinates
hulls <- wrap_hull(X, margin = 1, group = iris$Species)

## Confidence ellipse coordinates
conf <- wrap_confidence(X, margin = 1, group = iris$Species,
                        level = c(0.68, 0.95))

## Tolerance ellipse coordinates
conf <- wrap_confidence(X, margin = 1, group = iris$Species, level = 0.95)

## Plot with convex hulls
col <- c("#004488", "#DDAA33", "#BB5566")
viz_rows(X, highlight = iris$Species, col = col)
viz_hull(X, group = iris$Species, border = col)

dimensio documentation built on Nov. 25, 2023, 1:08 a.m.