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
# 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)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(CircStats)
Loading required package: MASS
Loading required package: boot
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/CircStats/dwrpnorm.Rd_%03d_medium.png", width=480, height=480)
> ### Name: dwrpnorm
> ### Title: Wrapped Normal Density Function
> ### Aliases: dwrpnorm
> ### Keywords: distribution
>
> ### ** 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)
[1] 1
>
>
>
>
>
> dev.off()
null device
1
>