Computes the points needed to plot the SNNTS density function for spherical data
Usage
snntsdensityplot(long, lat, cpars = 1, M = c(0,0))
Arguments
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
...
Arguments passed to the function plot
Value
The points needed to plot the SNNTS density function
Note
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
Author(s)
Juan Jose Fernandez-Duran and Maria Mercedes Gregorio-Dominguez
References
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
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/snntsdensityplot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: snntsdensityplot
> ### Title: Plots a SNNTS density for spherical data
> ### Aliases: snntsdensityplot
>
> ### ** Examples
>
> data(Datab6fisher_ready)
> data<-Datab6fisher_ready
> M<-c(4,4)
> cest<-snntsmanifoldnewtonestimation(data, M)
> 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])
>
>
>
>
>
> dev.off()
null device
1
>