Learn R Programming

CircNNTSR (version 2.0)

snntsloglik: SNNTS log-likelihood function for spherical data

Description

Computes the log-likelihood function with SNNTS density for spherical data

Usage

snntsloglik(data, cpars = 1, M = c(0,0))

Arguments

data
a matrix of angles in radians, first column for longitude (between 0 and 2*pi), second column for latitude (between 0 and pi), a row for each data point
cpars
vector of complex numbers of dimension prod(M+1). The first element is a real and positive number. First M[1]+1 elements correspond to longitude, next M[2]+1 elements correspond to latitude. The sum of the SQUARED moduli of the c parameters must be equ
M
vector with number of components in the SNNTS for each dimension

References

Fernandez-Duran J. J. y Gregorio Dominguez, M. M. (2008) Spherical Distributions Based on Nonnegative Trigonometric Sums, Working Paper, Statistics Department, ITAM, DE-C08.6

Examples

Run this code
data(Datab6fisher_ready)
data<-Datab6fisher_ready
M<-c(4,4)
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)
snntsloglik(data, cpars, M)

Run the code above in your browser using DataLab