ellipse {geostats}R Documentation

ellipse

Description

Compute the x-y coordinates of an error ellipse.

Usage

ellipse(mean, cov, alpha = 0.05, n = 50)

Arguments

mean

two-element vector with the centre of the ellipse

cov

the 2 x 2 covariance matrix of x and y

alpha

confidence level of the ellipse

n

the number of points at which the ellipse is evaluated

Value

a two-column matrix of plot coordinates

Examples

X <- rnorm(100,mean=100,sd=1)
Y <- rnorm(100,mean=100,sd=1)
Z <- rnorm(100,mean=100,sd=5)
dat <- cbind(X/Z,Y/Z)
plot(dat)
ell <- ellipse(mean=colMeans(dat),cov=cov(dat))
polygon(ell)

[Package geostats version 1.6 Index]