Learn R Programming

CircNNTSR (version 2.0)

nntsdensity: NNTS density function

Description

Density function for the NNTS model

Usage

nntsdensity(data, cpars = 1/sqrt(2 * pi), M = 0)

Arguments

data
a vector of angles in radians
cpars
vector of complex numbers of dimension M+1. The first element is a real and positive number. The sum of the SQUARED moduli of the c parameters must be equal to 1/(2*pi).
M
number of components in the NNTS

Value

  • The function gives the density function evaluated at each point in data

References

Fernandez-Duran, J.J. (2004). Circular Distributions Based on Nonnegative Trigonometric Sums, Biometrics, 60(2), 499-503.

Examples

Run this code
ccoef<-nntsrandominitial(3)
nntsdensity(1,ccoef,3)
nntsdensity(1+pi,ccoef,3)
nntsdensity(c(1,1+pi),ccoef,3)

Run the code above in your browser using DataLab