| ACG | R Documentation |
Density and simulation of the Angular Central Gaussian (ACG)
distribution on \mathcal{S}^{p-1}:=\{\boldsymbol{x}\in
\mathbb{R}^p:\|\boldsymbol{x}\|=1\}, p\ge 1. The density at
\boldsymbol{x} \in \mathcal{S}^{p-1}, p\ge 2, is given by
c^{\mathrm{ACG}}_{p,\boldsymbol{\Lambda}} (\boldsymbol{x}'
\boldsymbol{\Lambda}^{-1} \boldsymbol{x})^{-p/2} \quad\mathrm{with}\quad
c^{\mathrm{ACG}}_{p,\boldsymbol{\Lambda}}:= 1 / (\omega_p
|\boldsymbol{\Lambda}|^{1/2})
where \boldsymbol{\Lambda} is the shape matrix, a p\times p
symmetric and positive definite matrix, and \omega_p is the surface
area of \mathcal{S}^{p-1}.
d_ACG(x, Lambda, log = FALSE)
c_ACG(p, Lambda, log = FALSE)
r_ACG(n, Lambda)
x |
locations in |
Lambda |
the shape matrix |
log |
flag to indicate if the logarithm of the density (or the normalizing constant) is to be computed. |
p |
dimension of the ambient space |
n |
sample size, a positive integer. |
Due to the projection of the ACG, the shape matrix
\boldsymbol{\Lambda} is only identified up to a constant, that is,
\boldsymbol{\Lambda} and c\boldsymbol{\Lambda} give the same ACG
distribution. Usually, \boldsymbol{\Lambda} is normalized to have trace
equal to p.
c_ACG is vectorized on p. If p = 1, then the ACG is the
uniform distribution in the set \{-1, 1\}.
Depending on the function:
d_ACG: a vector of length nx or 1 with the
evaluated density at x.
r_ACG: a matrix of size c(n, p) with the random sample.
c_ACG: the normalizing constant.
Tyler, D. E. (1987). Statistical analysis for the angular central Gaussian distribution on the sphere. Biometrika, 74(3):579–589. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/biomet/74.3.579")}
tangent-elliptical, unif.
# Simulation and density evaluation for p = 2
Lambda <- diag(c(5, 1))
n <- 1e3
x <- r_ACG(n = n, Lambda = Lambda)
col <- viridisLite::viridis(n)
r <- runif(n, 0.95, 1.05) # Radius perturbation to improve visualization
dens <- d_ACG(x = x, Lambda = Lambda)
plot(r * x, pch = 16, col = col[rank(dens)])
# Simulation and density evaluation for p = 3
Lambda <- rbind(c(5, 1, 0.5),
c(1, 2, 1),
c(0.5, 1, 1))
x <- r_ACG(n = n, Lambda = Lambda)
dens <- d_ACG(x = x, Lambda = Lambda)
scatterplot3d::scatterplot3d(x, xlim = c(-1, 1), ylim = c(-1, 1),
zlim = c(-1, 1), color = col[rank(dens)],
pch = 16, xlab = "", ylab = "", zlab = "",
angle = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.