ellipsoidq: Helper for Creating Objects of Class 'ellipsoidq'

View source: R/ellipsoidq.R

ellipsoidqR Documentation

Helper for Creating Objects of Class ellipsoidq

Description

Creates an object that represents a quantile region or estimated quantile region of an elliptical distribution.

Usage

ellipsoidq(location = rep(0, 2), scatter = diag(2), scale = 1)

Arguments

location

An integer or double vector. Represents location of the ellipsoid.

scatter

An integer or double matrix. Determines the shape of the ellipsoid.

scale

An integer or double scalar. Scales the ellipsoid, see details for more information.

Details

Object of class ellipsoidq represents complement of an open ellipsoid,

Q(\mu, \Sigma, r) \coloneqq \{x\in\mathbb{R}^d : (x - \mu)^T\Sigma^{-1}(x - \mu) \geq r^2\}.

Here \mu, \Sigma and r correspond to mu, Sigma and scale, respectively. For example, Q(\mu, \Sigma, r) is the (1-p) quantile region of an elliptical distribution when \mu is equal to the location of the elliptical distribution, \Sigma is equal to the scatter matrix of the distribution and r is the (1-p)-quantile of the generating variate \mathcal{R}. See documentation of relliptical for more details about elliptical distributions.

Value

An object of class ellipsoidq. Object of class ellipsoidq is a list containing values of mu, sigma and scale.

See Also

relliptical, qreg

Examples

# (1 - 0.05) quantile region a of 2-dimensional t-distribution with degrees
# of freedom equal to three.
p <- 0.05
d <- 2
df <- 3
mu <- c(-1, 1)
sigma <- matrix(c(11, 10.5, 10.5, 11.25), nrow = 2, byrow = TRUE)
r <- sqrt(d * qf(1 - p, d, df))
x <- ellipsoidq(mu, sigma, r)

perej1/extreme documentation built on Dec. 4, 2024, 4:27 p.m.