Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dwrpnorm

Wrapped Normal Density Function


Description

Estimate of the wrapped normal density function.

Usage

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

Examples

# 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

Circular Statistics, from "Topics in Circular Statistics" (2001)

v0.2-6
GPL-2
Authors
S-plus original by Ulric Lund <ulund@calpoly.edu>, R port by Claudio Agostinelli <claudio.agostinelli@unitn.it>
Initial release
2018-06-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.