Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rmixvmf

Random values simulation from a mixture of von Mises-Fisher distributions


Description

The function simulates random values simulation from a given mixture of von Mises-Fisher distributions.

Usage

rmixvmf(n, prob, mu, k)

Arguments

n

The sample size.

prob

This is avector with the mixing probability of each group.

mu

A matrix with the mean direction of each group.

k

A vector with the concentration parameter of each group.

Details

The function simulates random values simulation from a given mixture of von Mises-Fisher distributions using the rvmf function.

Value

A list including:

id

An indicator of the group of each simulated vector.

x

A matrix with the simulated data.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr and Giorgos Athineou <gioathineou@gmail.com>

References

Kurt Hornik and Bettina Grun (2014). movMF: An R Package for Fitting Mixtures of von Mises-Fisher Distributions http://cran.r-project.org/web/packages/movMF/vignettes/movMF.pdf

See Also

Examples

k <- runif(4, 4, 20)
prob <- c(0.2, 0.4, 0.3, 0.1)
mu <- matrix(rnorm(16), ncol = 4)
mu <- mu / sqrt( rowSums(mu^2) )
x <- rmixvmf(200, prob, mu, k)$x
bic.mixvmf(x, 5)

Directional

A Collection of R Functions for Directional Data Analysis

v4.9
GPL-2
Authors
Michail Tsagris, Giorgos Athineou, Anamul Sajib, Eli Amson, Micah J. Waldstein
Initial release
2021-03-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.