ACG {rotasym} | R Documentation |
Angular central Gaussian distribution
Description
Density and simulation of the Angular Central Gaussian (ACG)
distribution on
,
. The density at
,
, is given by
where is the shape matrix, a
symmetric and positive definite matrix, and
is the surface area of
.
Usage
d_ACG(x, Lambda, log = FALSE)
c_ACG(p, Lambda, log = FALSE)
r_ACG(n, Lambda)
Arguments
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. |
Details
Due to the projection of the ACG, the shape matrix
is only identified up to a constant,
that is,
and
give the same ACG distribution.
Usually,
is normalized to have trace
equal to
.
c_ACG
is vectorized on p
. If , then the ACG is the
uniform distribution in the set
.
Value
Depending on the function:
-
d_ACG
: a vector of lengthnx
or1
with the evaluated density atx
. -
r_ACG
: a matrix of sizec(n, p)
with the random sample. -
c_ACG
: the normalizing constant.
Author(s)
Eduardo García-Portugués, Davy Paindaveine, and Thomas Verdebout.
References
Tyler, D. E. (1987). Statistical analysis for the angular central Gaussian distribution on the sphere. Biometrika, 74(3):579–589. doi:10.1093/biomet/74.3.579
See Also
Examples
# 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
plot(r * x, pch = 16, col = col[rank(d_ACG(x = x, Lambda = Lambda))])
# 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)
if (requireNamespace("rgl")) {
rgl::plot3d(x, col = col[rank(d_ACG(x = x, Lambda = Lambda))], size = 5)
}