Random generation functions for nine finite mixtures of spherical von Mises-Fisher allowing different numbers of modes.
rspheremix(n, model = NULL)A matrix with \(n\) unit length rows representing the generated values from a finite mixture of spherical von Mises-Fisher.
Number of observations to generate.
Number between 1 and 9, corresponding with a model defined in Saavedra-Nieves and Crujeiras (2021). See Details.
Paula Saavedra-Nieves and Rosa M. Crujeiras.
These nine spherical models are obtained as mixtures of von Mises distributions where the density \(f\) is given by:
$$
f=\sum_{i=1}^I w_i K_{vM}(x;m_i;k_i), w_i\geq 0;\sum_{i=1}^I w_i=1
$$ with \(K_vM\) denoting the von Mises-Fisher kernel density; \(m_i\), \(k_i\) and \(w_i\) the mean, concentration and weight corresponding to each component. More details can be found in Hornik and Grun (2014) and Wood (1994). The combination of means, concentration parameters and the weights of spherical models from Saavedra-Nieves and Crujeiras (2021) are specified below:
S1: (0, 0, 1) (\(m\)); 10 (\(k\)); 1 (\(w\)).
S2: (0, 0, 1), (0, 0, -1) (\(m\)); 1, 1 (\(k\)); 1/2, 1/2 (\(w\)).
S3: (0, 0, 1), (0, 0, -1) (\(m\)); 10, 1 (\(k\)); 1/2, 1/2 (\(w\)).
S4: (0, 0, 1); (0, 1/\(\sqrt2\), 1/\(\sqrt2\)) (\(m\)); 10, 10 (\(k\)); 1/2, 1/2 (\(w\)).
S5: (0, 0, 1); (0, 1/\(\sqrt2\), 1/\(\sqrt2\)) (\(m\)); 10, 10 (\(k\)); 2/5, 3/5 (\(w\)).
S6: (0, 0, 1); (0, 1/\(\sqrt2\), 1/\(\sqrt2 \)) (\(m\)); 10, 5 (\(k\)); 1/5, 4/5 (\(w\)).
S7: (0, 0, 1), (0, 1, 0), (1, 0, 0) (\(m\)); 5, 5, 5 (\(k\)); 1/3, 1/3, 1/3 (\(w\)).
S8: (0, 0, 1), (0, 1, 0), (1, 0, 0) (\(m\)); 5, 5, 5 (\(k\)); 2/3, 1/6, 1/6 (\(w\)).
S9: (0, 0, 1); (0, 1/\(\sqrt 2\), 1/\(\sqrt 2\)), (0, 1, 0) (\(m\)); 10, 10, 10 (\(k\)); 1/3, 1/3, 1/3 (\(w\)).
Hornik, K. and Grun, B. (2014). movMF: an R package for fitting mixtures of von Mises-Fisher distributions. Journal of Statistical Software, 58(10), 1-31.
Saavedra-Nieves, P. and Crujeiras, R. M. (2021). Nonparametric estimation of directional highest density regions. Advances in Data Analysis and Classification, 1-36.
Wood, A. T. (1994). Simulation of the von Mises Fisher distribution. Communications in Statistics-Simulation and Computation, 23(1), 157-164.
# Random generation from model 1 in library HDiR
data <- rspheremix(500, model=1)
library(Directional)
sphereplot(data)
Run the code above in your browser using DataLab