*! v1.0.3 IHSalgado-Ugarte 26March2016
help for circwarp

Title

circwarp -- Performs ASH-WARP kernel density estimation for circular data

Syntax

circwarp varname [if] [in] [, hwidth(#) mval(number of averaged shifted histograms) kercode(#) ype(#)

numodes modes nuamodes amodes nograph circgph rval(#) fr(#) gs(#)

gen(denvar degvar) scatter_options]

Description

circwarp calculates kernel density estimators for circular variables with azimutal scale (0 to 360 degrees) by means of the ASH-WARPing procedure (Scott, 1985, 1992; Haerdle, 1991; Salgado-Ugarte, et al. 1995) and draws the result.
It is possible to choose the kernel function, to specify the smoothing parameter (half-width), the number of averaged histograms (10 suggested) and to employ a linear (default) or a circular graph.
Additionally it provides modality (and anti-modality) information. It saves significative calculation time with big data sets.

Options

hwidth(#) is the smoothness parameter (half-width) in degrees. The default is 30.

mval(#) specifies the number of averaged shifted histograms used to calculate the density estimations. A number of 10 (default) is suggested.

kercode(#) set kernel (weight) function according to the following numerical codes (default is 4):

1 = Uniform

2 = Triangle

3 = Epanechnikov

4 = Quartic (Biweight)

5 = Triweight

6 = Gaussian

gtype permits to chose the resulting graphical display according to the following numerical codes (defalut is 1):

1 = Polygon

2 = Step (histogram like)

3 = Circular

numodes displays the number of modes (maxima) in the density estimation.

modes lists the estimated values for each mode. The numodes option must
be included first.

nuamodes displays the number of antimodes (minima) in the density estimation.

amodes lists the estimated values for each antimode. The nuamodes option must
be included first.

nograph(nograph) suppresses the graph drawing.

gen(denvar degvar) specifies the name of the new variables in which probability density estimates (denvar) and the equally spaced angles (degvar) are to be stored.

graph_options are any of the options allowed with graph, twoway; see help for graph.

Options for graph type 3 (circular)

rval is a factor controlling the radius size of the circle used.

frval is a factor applied to the density values in the cosine and sine transformation. It permits to stretch or compress the density values arround the circle.

gsval is a factor controlling the size of the graph. Large values give small graphics while less than unity figures produce bigger circular graphs.

{Defaults are 1 in all cases. It is possible for the graphs to depart from circle by using other values. This can be corrected by using the right combination.

Examples

. use meteorofeszcor6

. circkden wnd if dias>334 & dias < 366

. circbw wnd if dias>334 & dias < 366

. circwarp wnd if dias>334 & dias < 366, h(18) m(10) k(4) numodes modes

. circwarp wnd if dias>334 & dias < 366, h(18) m(10) k(3) gt(2)

. circwarp wnd if dias>334 & dias < 366, h(38) m(10) k(4) numodes modes gt(3)

. circwarp wnd if dias>334 & dias < 366, h(14.5) nuamodes amodes gen(density deg)

Authors

Isaías Hazarmabeth Salgado-Ugarte,
Laboratorio de Biometría y Biología Pesquera, FES Zaragoza, UNAM.

isalgado@unam.mx

Verónica Mitsui Saito-Quezada
Laboratorio de Biometría y Biología Pesquera, FES Zaragoza, UNAM.

mitsuisaito@gmail.com

Marco A. Pérez-Hernández,
Departamento de Biología, UAM Iztapalapa.

maph@xanum.uam.mx

References

Cox, N.J. 1998. Circular statistics in Stata. 3rd UK User Group meeting. June 5, 1997. London.

Fisher, N.I. 1993. Statistical analysis of circular data. Cambridge University Press, Cambridge, 296p.

Härdle, W. 1991. Smoothing Techniques with Implementation in S. Springer-Verlag.

Salgado-Ugarte, I.H., V.M. Saito-Quezada & M.A. Pérez-Hernández, 2018. Averaged shifted histograms (ASH) or Weighted Averaging of Rounded Points (WARP), Efficient Methods to Calculate Kernel Density Estimators for Circular Data. Memorias del del XXXI Foro Internacional de Estadística y del XXXII Foro Nacional de Estadística. Asociación Mexicana de Estadística, INEGI, Mexico: 89-96.

Salgado-Ugarte, I.H., M. Shimizu & T. Taniuchi, 1995. ASH, WARPing, and kernel density estimation for univariate data. Stata Technical Bulletin 26: 23-31.

Scott, D.W. 1985. Averaged shifted histograms: effective nonparametric density estimators in several dimensions. Annals of Statistics, 13: 1024-1040.

Scott, D.W. 1992. Multivariate Density Estimation: Theory, Practice and Visualization. John Wiley.

Also see

Manual: [R] kdensity

Online: Help for circbw, circkden, cirkdevm, circgph, circnpde