Skip to contents

Density, probability distribution function, quantiles, and random generation for the circular normal distribution with mean and kappa.

Usage

rvm(n, mean, kappa)

dvm(theta, mean, kappa)

pvm(theta, mean, kappa, from = NULL, tol = 1e-20)

qvm(p, mean = 0, kappa, from = NULL, tol = .Machine$double.eps^(0.6))

Arguments

n

number of observations in degrees

mean

mean in degrees

kappa

concentration parameter

theta

angular value in degrees

from

if NULL is set to \(\mu-\pi\). This is the value from which the pvm and qvm are evaluated. in degrees.

tol

the precision in evaluating the distribution function or the quantile.

p

numeric vector of probabilities with values in \([0,1]\).

Value

dvm gives the density, pvm gives the probability of the von Mises distribution function, rvm generates random deviates (in degrees), and qvm provides quantiles (in degrees).

Examples

x <- rvm(100, mean = 90, kappa = 2)
dvm(x, mean = 90, kappa = 2)
#>   [1] 0.509479911 0.094523734 0.401135165 0.015150245 0.515056867 0.504234831
#>   [7] 0.510477840 0.417917149 0.482935548 0.494885825 0.505735970 0.009583728
#>  [13] 0.411485278 0.252392989 0.489937889 0.359115776 0.368594044 0.046043060
#>  [19] 0.439255354 0.416447381 0.501441564 0.503179719 0.170856590 0.431869095
#>  [25] 0.246142225 0.498646417 0.501278266 0.014255796 0.488788161 0.140656755
#>  [31] 0.511103710 0.482409721 0.467849398 0.242310057 0.333004834 0.013662820
#>  [37] 0.384791300 0.490177362 0.035168128 0.511722334 0.492856360 0.188095562
#>  [43] 0.226244762 0.072881804 0.012763882 0.422627248 0.203571299 0.515204302
#>  [49] 0.298873287 0.497040593 0.359998578 0.315576284 0.515366912 0.372728343
#>  [55] 0.487896919 0.066609092 0.499256709 0.508277953 0.171786330 0.506481068
#>  [61] 0.455796664 0.185742899 0.441850442 0.410420283 0.148953393 0.385571101
#>  [67] 0.347809109 0.515859172 0.403001514 0.500054877 0.507372960 0.513706351
#>  [73] 0.449611203 0.474620240 0.032438880 0.069935148 0.513354661 0.514193617
#>  [79] 0.480083493 0.176627398 0.515312282 0.478703207 0.513678425 0.283611625
#>  [85] 0.485716302 0.218614066 0.010216541 0.515870312 0.223709206 0.456517077
#>  [91] 0.199515458 0.234582553 0.311868557 0.407001160 0.277497437 0.479684441
#>  [97] 0.412586480 0.098842778 0.174616618 0.202228053
pvm(x, mean = 90, kappa = 2)
#>   [1] 0.442544954 0.950072041 0.741008210 0.007857925 0.479326901 0.422546553
#>   [7] 0.552794403 0.723003860 0.369971170 0.396093635 0.427699560 0.001131250
#>  [13] 0.730083300 0.139463525 0.615454125 0.219307839 0.772295762 0.025557679
#>  [19] 0.697580927 0.275357325 0.413779628 0.580877726 0.909659616 0.706756641
#>  [25] 0.135412002 0.405827150 0.413294757 0.992855709 0.617973196 0.073849581
#>  [31] 0.549647800 0.368943394 0.656804363 0.867045356 0.802486011 0.006644475
#>  [37] 0.757243420 0.614922368 0.980099386 0.546327379 0.608793502 0.899880931
#>  [43] 0.122862054 0.039055713 0.005832365 0.282336852 0.890848700 0.481256035
#>  [49] 0.828529715 0.401551529 0.220078056 0.183906846 0.516354327 0.231458000
#>  [55] 0.619888867 0.964080908 0.592495475 0.437392098 0.909139405 0.569600178
#>  [61] 0.324798078 0.901232462 0.305751447 0.731233114 0.078304976 0.243505794
#>  [67] 0.790355533 0.503679211 0.739077976 0.590254174 0.433777613 0.466477622
#>  [73] 0.316095716 0.645414746 0.018436052 0.037582266 0.463874614 0.470461315
#>  [79] 0.635507867 0.093582234 0.482805752 0.638079679 0.533736427 0.160567496
#>  [85] 0.375550565 0.881819070 0.997279506 0.497208998 0.121298807 0.674158882
#>  [91] 0.106759757 0.128058756 0.181097705 0.734883686 0.843686942 0.636256509
#>  [97] 0.728887871 0.947883292 0.907550879 0.891642717
qvm(c(.25, .5, .75), mean = 90, kappa = 2)
#> [1]  59.65254  90.00000 120.34746