Skip to contents

gell provides a set of ways to specify a generalized ellipsoid in \(R^p\), using the (U, D) representation to include all special cases, where U is a square orthogonal matrix, and D is diagonal with extended non-negative real numbers, i.e. 0, Inf or a positive real.

Usage

gell(x, ...)

# Default S3 method
gell(x, center = 0, Sigma, ip, span, A, u, d = 1, epsfac = 2, ...)

# S3 method for class 'gell'
gell(x, ...)

Arguments

x

An object

...

Other arguments

center

A vector specifying the center of the ellipsoid

Sigma

A square, symmetric, non-negative definite dispersion (variance) matrix

ip

A square, symmetric, non-negative definite inner product matrix. See Details.

span

A subspace with a given span. See Details.

A

A matrix giving a linear transformation of the unit sphere.

u

A U matrix

d

Diagonal elements of a D matrix

epsfac

Factor of .Machine$double.eps used to distinguish zero vs. positive singular values

Value

A (U, D) representation of the ellipsoid, with components

center

center

u

Right singular vectors

d

Singular values

Details

The resulting class of ellipsoids includes degenerate ellipsoids that are flat and/or unbounded. Thus ellipsoids are naturally defined to include lines, hyperplanes, points, cylinders, etc.

gell can currently generate the (U, D) representation from 5 ways of specifying an ellipsoid:

  1. From the non-negative definite dispersion (variance) matrix, \(Sigma: U D^2 U' = Sigma\), where some elements of the diagonal matrix D can be 0. This can only generate bounded ellipsoids, possibly flat.

  2. From the non-negative definite inner product matrix \('ip': U W^2 U = C\) where some elements of the diagonal matrix W can be 0. Then set D = W^-1 where 0^-1 = Inf. This can only generate fat (non-empty interior) ellipsoids, possibly unbounded.

  3. From a subspace spanned by 'span' Let U_1 be an orthonormal basis of Span('span'), let U_2 be an orthonormal basis of the orthogonal complement, the \(U = [ U_1 U_2 ]\) and \(D = diag( c(Inf,...,Inf, 0,..,0))\) where the number of Inf's is equal to the number of columns of U_1.

  4. From a transformation of the unit sphere given by A(Unit sphere) where A = UDV', i.e. the SVD.

  5. (Generalization of 4): A, d where A is any matrix and d is a vector of factors corresponding to columns of A. These factors can be 0, positive or Inf. In this case U and D are such that U D(Unit sphere) = A diag(d)(Unit sphere). This is the only representation that can be used for all forms of ellipsoids and in which any ellipsoid can be represented.

References

Friendly, M., Monette, G. and Fox, J. (2013). Elliptical Insights: Understanding Statistical Methods through Elliptical Geometry. Statistical Science, 28(1), 1-39.

See also

Author

Georges Monette

Examples


gell(Sigma = diag(3))    # the unit sphere
#> $center
#> [1] 0 0 0
#> 
#> $u
#>      [,1] [,2] [,3]
#> [1,]    0    0    1
#> [2,]    0    1    0
#> [3,]    1    0    0
#> 
#> $d
#> [1] 1 1 1
#> 
#> attr(,"class")
#> [1] "gell"

(zplane <- gell(span = diag(3)[,1:2]))    # a plane
#> $center
#> [1] 0 0 0
#> 
#> $u
#>      [,1] [,2] [,3]
#> [1,]    1    0    0
#> [2,]    0    1    0
#> [3,]    0    0    1
#> 
#> $d
#> [1] Inf Inf   0
#> 
#> attr(,"class")
#> [1] "gell"