snntsdensityplot | R Documentation |
Computes the points needed to plot the SNNTS density function for spherical data
snntsdensityplot(long, lat, cpars = 1, M = c(0,0))
long |
Grid for longitude. Vector with values between zero and 2*pi |
lat |
Grid for latitude. Vector with values between zero and pi |
cpars |
Vector of complex numbers of dimension prod(M+1). The sum of the squared moduli of the c parameters must be equal to one |
M |
Vector with the number of components in the SNNTS for each dimension |
The points needed to plot the SNNTS density function
The parameters cpars used by this function are the transformed parameters of the SNNTS density function, which lie on the surface of the unit hypersphere
Juan Jose Fernandez-Duran and Maria Mercedes Gregorio-Dominguez
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
set.seed(200)
data(Datab6fisher_ready)
data<-Datab6fisher_ready
M<-c(4,4)
cest<-snntsmanifoldnewtonestimation(data, M, iter=150)
cpars<-cest$cestimates[,3]
longitud<-seq(0,360,10)*(pi/180)
latitud<-seq(0,180,5)*(pi/180)
z<-outer(longitud,latitud,FUN="snntsdensityplot",cpars,M)
persp(longitud,latitud,z,theta=45,phi=30)
contour(longitud,latitud,z)
points(data[,1],data[,2])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.