dwrpnorm: Wrapped Normal Density Function

Description Usage Arguments Details Value References See Also Examples

Description

Estimate of the wrapped normal density function.

Usage

1
dwrpnorm(theta, mu, rho, sd=1, acc=1e-5, tol=acc)

Arguments

theta

value at which to evaluate the density function, measured in radians.

mu

mean direction of distribution, measured in radians.

rho

mean resultant length of distribution.

sd

different way of select rho, see details below.

acc

parameter defining the accuracy of the estimation of the density. Terms are added to the infinite summation that defines the density function until successive estimates are within acc of each other.

tol

the same as acc.

Details

The form of the wrapped normal density function is an infinite series with index going from negative infinity to positive infinity. This function begins with the zeroth term and adds terms to the series, corresponding to both the positive and negative index, until the summation changes by less than the parameter value of acc. You can set rho by using sd with the following equivalence:

ρ = \exp{- σ^2/2}

Value

Returns an estimate of the wrapped normal density function.

References

Jammalamadaka, S. Rao and SenGupta, A. (2001). Topics in Circular Statistics, Section 2.2.6, World Scientific Press, Singapore.

See Also

rwrpnorm

Examples

1
2
3
4
5
6
7
8
# Values for which to evaluate density
theta <- c(1:500)*2*pi/500
#Compute wrapped normal density function
density <- c(1:500)
for(i in 1:500) density[i] <- dwrpnorm(theta[i], pi, .75)
plot(theta, density)
#Approximate area under density curve
sum(density*2*pi/500)

CircStats documentation built on May 2, 2019, 2:24 a.m.