rmixcirc: Random value generation from mixtures of circular...

View source: R/rmixcirc.R

rmixcircR Documentation

Random value generation from mixtures of circular distributions

Description

Random value generation from mixtures of circular distributions.

Usage

rmixcirc(n, rads = TRUE, probs, mu, kappa, rho, type = "vm")

Arguments

n

The sample size.

rads

The data that to be generated will be expressed in rads (TRUE) or angles (FALSE)?

probs

A vector with the mixing probability of each group.

mu

A vector with the circular mean or location parameter (in radians) of each group.

kappa

A vector with the concentration parameter of each group.

rho

A vector with the \rho parameter of the GCPC distribution.

type

The distribution to fit, "vm" is von Mises mixtures, "cp" is circular Purkayastha mixtures, "pn" is projected normal mixtures, "gcpc" is GCPC mixtures and "cipc" is CIPC (or wrapped Cauchy) mixtures.

Details

The function simulates random values simulation from a given mixture of circular distributions.

Value

A list including:

id

An indicator of the group of each simulated vector.

u

A vector with the simulated data.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Perdikis T., Alharbi N. and Tsagris M. (2026). Model–based clustering for spherical and hyper–spherical data using elliptically symmetric distributions.

https://arxiv.org/abs/2605.27496

See Also

mixcirc.mle

Examples

u1 <- rnorm(100)
u2 <- rnorm(100, 1, 0.5)
u <- c(u1, u2)
mod <- mixcirc.mle(u, type = "vm")
y <- rmixcirc(500, rads = TRUE, probs = mod$param[, 1], mu = mod$param[, 2], kappa = mod$param[, 3])
hist(y$u)

circda documentation built on Sept. 15, 2026, 5:09 p.m.