rvm function

Sample from von Mises distribution

Sample from von Mises distribution

rvm(n, mu, kappa)

Arguments

  • n: Number of samples
  • mu: Mean parameter
  • kappa: Concentration parameter

Returns

Vector of n samples from vm(mu, kappa)

Details

Uses basic rejection sampling, based on dvm(), which might be inefficient for large kappa. Could be improved following Best & Fisher (1979), Efficient simulation of the von Mises distribution, JRSSC, 28(2), 152-157.

Other functions in hmmTMB

Related functions from the same R package