Learn R Programming

CircNNTSR (version 2.0)

mnntsdensity: MNNTS density function

Description

Density function for the MNNTS model

Usage

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

Arguments

data
a matrix of angles in radians, a column for each dimension, a row for each data point
cpars
parameters of the model. 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 dimension 1, next M[2]+1 elements correspond to dimension 2, and so on. The sum of the SQUA
M
vector of length R with number of components in the MNNTS for each dimension
R
number of dimensions

References

Fernandez-Duran, J.J. and Gregorio-Dominguez, M.M. (2009) Multivariate Angular Distributions Based on Multiple Nonnegative Trigonometric Sums, Working Paper, Statistics Department, ITAM, DE-C09.1

Examples

Run this code
M<-c(2,3)
R<-length(M)
data<-c(0,pi,pi/2,pi,pi,3*pi/2,pi,2*pi,2*pi,pi)
data<-matrix(data,ncol=2,byrow=TRUE)
data
ccoef<-mnntsrandominitial(M,R)
mnntsdensity(data,ccoef,M,R)

M<-c(2,3)
R<-length(M)
data(Nest)
data<-Nest
est<-mnntsmanifoldnewtonestimation(data,M,R,1000)
est
ccoef<-est$cestimates[,3]
mnntsdensity(data,ccoef,M,R)

Run the code above in your browser using DataLab