Last data update: 2014.03.03

R: Parameter estimation for NNTS distributions
nntsmanifoldnewtonestimationR Documentation

Parameter estimation for NNTS distributions

Description

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

Usage

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

Arguments

data

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

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

cestimates

Matrix of (M+1)x2. The first column is the parameter numbers, and the second column is the c parameter's estimators

loglik

Optimum log-likelihood value

AIC

Value of Akaike's Information Criterion

BIC

Value of Bayesian Information Criterion

gradnormerror

Gradient error after the last iteration

Author(s)

Juan Jose Fernandez-Duran y Maria Mercedes Gregorio-Dominguez

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

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)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(CircNNTSR)

Attaching package: 'CircNNTSR'

The following object is masked from 'package:grDevices':

    trans3d

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/CircNNTSR/nntsmanifoldnewtonestimation.Rd_%03d_medium.png", width=480, height=480)
> ### Name: nntsmanifoldnewtonestimation
> ### Title: Parameter estimation for NNTS distributions
> ### Aliases: nntsmanifoldnewtonestimation
> 
> ### ** Examples
> 
> 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)
$cestimates
  k               cestimates
1 0  0.28205248+0.000000000i
2 1 -0.00556998-0.004088344i
3 2  0.08454695+0.269082543i

$loglik
[1] -27.77129

$AIC
[1] 63.54257

$BIC
[1] 67.5255

$gradnormerror
[1] 2.47525e-16

> 
> 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)
$cestimates
  k              cestimates
1 0  0.28645175+0.00000000i
2 1  0.11655438-0.12669303i
3 2 -0.14659000-0.16080633i
4 3  0.01079598+0.00065866i

$loglik
[1] -107.9374

$AIC
[1] 227.8749

$BIC
[1] 241.8593

$gradnormerror
[1] 2.466083e-08

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>