# data.ellipse: Construct data ellipses suitable for use with Youden plots. In metRology: Support for Metrological Applications

## Description

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

## Usage

 ```1 2 3 4 5 6 7``` ``` data.ellipse(cov, probs = 0.95, plot = TRUE, npoints = 100, ...) ## S3 method for class 'd.ellipse' summary(object, ...) ## S3 method for class '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`.

## 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.

## 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*n by 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`

S L R Ellison

## 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

`cov.dellipse`, `plot.d.ellipse`, `polygon`

## Examples

 ```1 2 3 4``` ```data(chromium) cov.Cr <- cov.dellipse(chromium) dellipse.Cr <- data.ellipse(cov.Cr, plot=FALSE) summary(dellipse.Cr) ```

### Example output

```Attaching package: 'metRology'

The following objects are masked from 'package:base':

cbind, rbind

\$ellipses
Length Class  Mode
p=0.95 396    -none- numeric

\$probs
Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
0.95    0.95    0.95    0.95    0.95    0.95

\$cov
Length Class  Mode
method 1      -none- character
cov    4      -none- numeric
cor    4      -none- numeric
center 2      -none- numeric
scale  2      -none- numeric
n.obs  1      -none- numeric
```

metRology documentation built on May 2, 2019, 12:20 p.m.