dell: Calculate coordinates of a data ellipse

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

dell to calculates the coordinates of a 2D data ellipse (concentration ellipse) from (X, Y) variables.

dellplus can produce, in addition to the points of an ellipse, the conjugate axes corresponding to a chol or other decomposition and the surrounding parallelogram defined by these axes.

Usage

1
2
3
dell(x, y, radius = 1, ...)

dellplus(x, y, ...)

Arguments

x, y

Either a two-column matrix or numeric vectors of the same length

radius

Radius of the ellipse-generating unit circle. The default, radius=1 corresponds to a "standard" ellipse.

...

Other arguments passed down to ell or ellplus.

Details

These functions simply calculate the mean vector and covariance matrix and call ell or ellplus.

Value

Returns a 2-column matrix of (X,Y) coordinates suitable for drawing with lines().

For dellplus, when more than one of the options ellipse, diameters, and box is TRUE, the different parts are separated by a row of NA.

Author(s)

Georges Monette

References

Monette, G. (1990). Geometry of Multiple Regression and Interactive 3-D Graphics. In Fox, J. & Long, S. (ed.) Modern Methods of Data Analysis, Sage Publications, 209-256.

See Also

cell, ell, ellplus,

Examples

1
2
3
4
5
6
7
8
9
data(Prestige)   # from car
attach(Prestige)
fit.simple <- lm( prestige ~ education, Prestige)

plot(prestige ~ education, type='p')
lines(dell(education, prestige), col="blue", lwd=3)
lines(bbox <- dellplus(education, prestige, box=TRUE))
lines(dellplus(education, prestige, diameter=TRUE, radius=2), col="gray")
detach(Prestige)

gmonette/spida15 documentation built on May 17, 2019, 7:26 a.m.