Learn R Programming

CircNNTSR (version 2.0)

nntsplot: Plots a NNTS density

Description

Plots the NNTS density

Usage

nntsplot(cpars = 1/sqrt(2 * pi), M = 0, ...)

Arguments

cpars
vector of complex numbers of dimension 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 1/(2*pi).
M
number of components in the NNTS
...
arguments passed for function curve

Examples

Run this code
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
est<-nntsmanifoldnewtonestimation(Turtles_radians,3)
est
#plot the estimated density
nntsplot(est$cestimates[,2],3)
#add the histogram to the estimated density plot
plot(Turtles_hist, freq=FALSE, add=TRUE)

Run the code above in your browser using DataLab