addEllipse: Adds an ellipse around some data to an existing plot

Description Usage Arguments Value Examples


This function adds an ellipse based on means and covariance to an existing plot. The ellipse can be scaled so as to represent any prediction interval of the data you wish, or alternatively any confidence interval of the bivariate means.


addEllipse(mu, sigma, m = NULL, n = 100, p.interval = NULL,
  ci.mean = FALSE, ...)



a vector of length two specifying the bivariate means


a 2x2 covariance matrix for the data


is the sample size of the dataset on which the ellipse is to be plotted. This is only informative if calculating the confidence interval of the bivariate mean, which requires a correction of 1/sqrt(m). Defaults to NULL and has no effect.


the number of data points to be used to plot the ellipse. More points makes for a smoother ellipse, especially if it has high eccentricity. Defaults to n = 100.


the quantile to be used to construct a prediction ellipse that contains p.interval proportion of the data. By default, p.interval = NULL and the Standard Ellipse is drawn which contains approximately 40% of the data. Setting p.interval = 0.95 will result in an ellipse that contains approximately 95% of the data.


a logical that determines whether the ellipse drawn is a prediction ellipse of the entire data, or a confidence interval of the bivariate means. Defaults to FALSE. If set to TRUE, then p.interval can be used to generate an appropriate % confidence interval of the bivariate means.


additional arguments as a list to be passed to plot.


A 6 x m matrix of the 6 Layman metrics of dX_range, dY_range, TA, CD, MNND and SDNND in rows, for each community by column



Search within the SIBER package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.