cfC_vonMises: Characteristic function of von Mises distribution

Description Usage Arguments Value See Also Examples

Description

cfC_vonMises(t) evaluates the characteristic function cf(t) of the von Mises distribution (circular normal distribution) with the parameters mu in (-pi,pi) and kappa > 0 (mu and 1/kappa are analogous to mu and sigma^2, the mean and variance in the normal distribution), on a circle e.g. the interval (-pi,pi), i.e. cf(t) = besseli(t,kappa)/besseli(0,kappa) .* exp(1i*t*mu).

Usage

1
cfC_vonMises(t, mu = 0, kappa = 1)

Arguments

t

numerical values (number, vector...)

mu

in (-pi, pi)

kappa

> 0

Value

characteristic function cf(t) of the von Mises distribution with the parameters mu and kappa > 0

See Also

For more details see WIKIPEDIA: https://en.wikipedia.org/wiki/Von_Mises_distribution

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# EXAMPLE1 (CF of the uniform von Mises distribution on (-pi,pi))
t <- seq(-10, 10, length.out = 501)
plotGraf(function(t)
  cfC_vonMises(t), t, title = "CF of the uniform von Mises distribution on (-pi,pi)")

# EXAMPLE2 (CF of the mixture of the von Mises distribution on (-pi,pi))
mu1 <- 0
kappa1 <- 5
mu2 <- 1
kappa2 <- 15
cf <-
  function(t)
    0.25 * cfC_vonMises(t, mu1, kappa1) + 0.75 * cfC_vonMises(t, mu2, kappa2)
t <- seq(-10, 10, length.out = 501)
plotGraf(cf, t, title = "CF of the mixture of the von Mises distribution")

# EXAMPLE3 (PDF/CDF of the von Mises distribution on (-pi,pi))
mu <- 0
kappa <- 5
cf  <- function(t)
  cfC_vonMises(t, mu, kappa)
result <- cf2DistGP(cf, xMin = -pi, xMax = pi)
angle <- result$x
radius <- result$pdf
plotPolar(angle, radius)

# EXAMPLE4 (PDF/CDF of the linear combinantion of 2 von Mises distribution on (-pi,pi))
mu1 <- 0
kappa1 <- 5
mu2 <- 1
kappa2 <- 15
cf <-
  function(t)
    cfC_vonMises(1 * t, mu1, kappa1) * cfC_vonMises(0.25 * t, mu2, kappa2)
result <- cf2DistGP(cf,
                    xMin = -pi,
                    xMax = pi,
                    isCircular = TRUE)
angle <- result$x
radius <- result$pdf
plotPolar(angle, radius)

# EXAMPLE5 (PDF/CDF of the mixture of the von Mises distribution on (0,2*pi))
mu1 <- 0
kappa1 <- 5
mu2 <- 1
kappa2 <- 15
mu3 <- pi
kappa3 <- 10
cf <-
  function(t)
    0.25 * cfC_vonMises(t, mu1, kappa1) + 0.25 * cfC_vonMises(t, mu2, kappa2) + 0.5 *
  cfC_vonMises(t, mu3, kappa3)
result <- cf2DistGP(cf,
                    xMin =  0,
                    xMax = 2 * pi,
                    isCircular = TRUE)
angle <- result$x
radius <- result$pdf
plotPolar(angle, radius)

Simkova/CharFun documentation built on May 9, 2019, 1:30 p.m.