View source: R/1.ord_compute_ellipse.R
| ord_compute_ellipse | R Documentation |
Calculates ellipse coordinates based on a covariance matrix and center. Supports confidence ellipses (standard error, "se") or dispersion ellipses ("sd").
ord_compute_ellipse(
cov,
center = c(0, 0),
kind = "se",
conf = 0.95,
npoints = 100,
n = NULL
)
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
|
conf |
Numeric confidence level or coverage (default 0.95). |
npoints |
Integer number of points to generate along ellipse perimeter (default 100). |
n |
Numeric sample size; required if |
A numeric matrix with two columns representing x and y coordinates of the ellipse.
cov_mat <- matrix(c(1, 0, 0, 1), 2, 2)
center <- c(0, 0)
ell_coords <- ord_compute_ellipse(cov_mat, center, kind = "se", conf = 0.95, n = 10)
plot(ell_coords, type = "l")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.