Learn R Programming

metRology (version 0.9-28-1)

data.ellipse: Construct data ellipses suitable for use with Youden plots.

Description

Constructs and optionally plots a set of probability ellipses for a bivariate normal distribution with defined centre and covariance.

Usage

data.ellipse(cov, probs = 0.95, plot = TRUE, npoints = 100, ...)

# S3 method for d.ellipse summary(object, ...)

# S3 method for d.ellipse print(x, ...)

Arguments

cov

Covariance and location object of class cov.dellipse as returned by cov.dellipse()

probs

A vector of probabilities at which ellipses will be constructed.

plot

Logical specifying whether the ellipses constructed will additionally be plotted. If TRUE, the result is plotted using plot.d.ellipse()

npoints

Integer number of points for each quadrant of the ellipses returned.

object

Object of class d.ellipse (for summary method).

x

Object of class d.ellipse (for print method.

Arguments passed to other methods, particularly plot.d.ellipse and, for print, format and print.default.

Value

An object of class d.ellipse, consisting of:

ellipses

A named list of ellipsoids named for each probability in probs. Each is a \(4*npoints\times 2\) matrix suitable for passing direct to polygon.

probs

Numeric vector of probabilities as supplied by probs

cov

Covariance object of class cov.dellipse as provided in cov

Details

data.ellipse constructs and returns one set of x, y coordinates for each value of probs, in a form that can be passed directly to polygon.

Ellipses are constructed from the upper probs quantile of the F distribution using

T = sqrt( 2 * (n - 1) * qf(probs, 2, n - 1)/(n - 2))

where n is the number of pairs used in forming the covariance matrix. If the number of points is missing or NA, Inf is substituted.

Summary and print methods are provided. The summary method returns a list with the same names as class d.ellipse, each containing a default summary of the respective member of the d.ellipse object. The print method returns its argument invisibly.

References

ISO 13528:2005 Statistical methods for use in proficiency testing by interlaboratory comparisons. (2005) International organization for Standardizaton, Geneva

Jackson, J. E. (1956) Quality control methods for two related variables. Industrial Quality Control, Vol. 7, pp. 2-6

Jackson, J. E. (1959) Control Methods for Several Related Variables. Technometrics, Vol. 1, pp. 359-377

See Also

cov.dellipse, plot.d.ellipse, polygon

Examples

Run this code
# NOT RUN {
data(chromium)
cov.Cr <- cov.dellipse(chromium)
dellipse.Cr <- data.ellipse(cov.Cr, plot=FALSE)
summary(dellipse.Cr)
# }

Run the code above in your browser using DataLab