ord_compute_ellipse: Compute coordinates for an ordination ellipse
Description
Calculates ellipse coordinates based on a covariance matrix and center.
Supports confidence ellipses (standard error, "se") or dispersion ellipses ("sd").
Usage
ord_compute_ellipse(
cov,
center = c(0, 0),
kind = "se",
conf = 0.95,
npoints = 100,
n = NULL
)
Value
A numeric matrix with two columns representing x and y coordinates of the ellipse.
Arguments
cov
Numeric matrix (2x2) covariance matrix.
center
Numeric vector of length 2 specifying the ellipse center coordinates.
kind
Character string specifying the type of ellipse: either
"se" for standard error/confidence ellipse or "sd" for standard deviation dispersion ellipse.
conf
Numeric confidence level or coverage (default 0.95).
npoints
Integer number of points to generate along ellipse perimeter (default 100).