Skip to contents

Computes and draws a confidence/tolerance ellipse.

Usage

ternary_ellipse(x, y, z, ...)

ternary_confidence(x, y, z, ...)

ternary_tolerance(x, y, z, ...)

# S4 method for class 'numeric,numeric,numeric'
ternary_ellipse(x, y, z, radius = 1, ...)

# S4 method for class 'ANY,missing,missing'
ternary_ellipse(x, radius = 1, ...)

# S4 method for class 'numeric,numeric,numeric'
ternary_confidence(x, y, z, level = 0.95, ...)

# S4 method for class 'ANY,missing,missing'
ternary_confidence(x, level = 0.95, ...)

# S4 method for class 'numeric,numeric,numeric'
ternary_tolerance(x, y, z, level = 0.95, ...)

# S4 method for class 'ANY,missing,missing'
ternary_tolerance(x, level = 0.95, ...)

Arguments

x, y, z

A numeric vector giving the x, y and z ternary coordinates of a set of points. If y and z are missing, an attempt is made to interpret x in a suitable way (see grDevices::xyz.coords()).

...

Further arguments to be passed to graphics::polygon().

radius

A numeric vector specifying the scaling of the half-diameters.

level

A numeric vector specifying the confidence/tolerance level.

Value

ternary_ellipse() is called it for its side-effects.

Details

Ellipse coordinates are computed after an isometric log ratio transformation of the original data.

Author

N. Frerebeau

Examples

## Ellipses
## Data from Aitchison 1986
ternary_plot(lava, panel.first = ternary_grid(5, 10))
ternary_tolerance(lava, level = 0.95, border = "blue", lty = 2)
ternary_confidence(lava, level = 0.95, border = "red", lty = 3)