Learn R Programming

CircNNTSR (version 2.0)

nntsmanifoldnewtonestimation: Parameter estimation for NNTS distributions

Description

Computes the maximum likelihood estimates of the NNTS parameters, through a Newton algorithm on the hypersphere

Usage

nntsmanifoldnewtonestimation(data, M=0, iter=1000, 
initialpoint = FALSE, cinitial)

Arguments

data
a vector of angles in radians
M
Number of components in the NNTS
iter
Number of iterations
initialpoint
TRUE if an initial point for the optimization algorithm will be used
cinitial
A vector of size M+1, the first element is real and the next M elements are complex (values for $c_0$ and $c_1, ...,c_M$). The sum of the squared moduli of the parameters must be equal to 1/(2*pi)

Value

  • cestimatesA matrix of (M+1)x2, the first column are the parameter number and the second column the parameter's c estimators
  • loglikOptimum loglikelihood value
  • AICValue of Akaike's Information Criterion
  • BICValue of Bayesian Information Criterion
  • gradnormerrorGradient's error after last iteration

References

Fernandez-Duran, J.J., Gregorio-Dominguez, M.M. (2010). Maximum Likelihood Estimation of Nonnegative Trigonometric Sums Models by Using a Newton-like Algorithm on Manifolds, Working Paper, Department of Statistics, ITAM, DE-C10.8

Examples

Run this code
a<-c(runif(10,3*pi/2,2*pi-0.00000001),runif(10,pi/2,pi-0.00000001))
#Estimation of the NNTSdensity with 2 components for data and 1000 iterations
nntsmanifoldnewtonestimation(a,2,1000)

data(Turtles_radians)
#Empirical analysis of data
Turtles_hist<-hist(Turtles_radians,breaks=10,freq=FALSE)
#Estimation of the NNTS density with 3 componentes for data
nntsmanifoldnewtonestimation(Turtles_radians,3)

Run the code above in your browser using DataLab