snntsdensity {CircNNTSR} | R Documentation |
SNNTS density function for spherical data
Description
Density function for the SNNTS model for spherical data
Usage
snntsdensity(data, cpars = 1, M = c(0,0))
Arguments
data |
Matrix of angles in radians. The first column contains longitude data (between zero and 2*pi), and second column contains latitude data (between zero and pi), with one row for each data point |
cpars |
Vector of complex numbers of dimension prod(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 one. |
M |
Vector with the number of components in the SNNTS for each dimension |
Value
The function returns the density function evaluated for each row in the data
Note
The parameters cinitial and cestimates used by this function are the transformed parameters of the SNNTS density function, which lie on the surface of the unit hypersphere
Author(s)
Juan Jose Fernandez-Duran and Maria Mercedes Gregorio-Dominguez
References
Juan Jose Fernandez-Duran, Maria Mercedes Gregorio-Dominguez (2016). CircNNTSR: An R Package for the Statistical Analysis of Circular, Multivariate Circular, and Spherical Data Using Nonnegative Trigonometric Sums. Journal of Statistical Software, 70(6), 1-19. doi:10.18637/jss.v070.i06
Examples
data(Datab6fisher_ready)
data<-Datab6fisher_ready
M<-c(2,3)
cpars<-rnorm(prod(M+1))+rnorm(prod(M+1))*complex(real=0,imaginary=1)
cpars[1]<-Re(cpars[1])
cpars<- cpars/sqrt(sum(Mod(cpars)^2))
snntsdensity(data, cpars, M)