Centring circular data
circcentre varname [if exp] [in range] , generate(newvar) [centre(centre) sine ]
Description
circcentre takes varname, a circular variable between 0 and 360 degrees, and produces a new variable newvar centring varname on the direction(s) given by centre(). If centre() is not specified, circcentre looks for a vector mean left behind by circsummarize as r(vecmean). newvar varies from -180 degrees to 180 degrees, with centre at 0 degrees.
Options
generate() specifies the name of the new variable and is not optional.
centre() specifies the direction(s) which correspond to the centre(s) of newvar. Possibilities are various constants or the name of a variable containing one or more directions.
sine specifies that the new variable be expressed on a sine scale, precisely as sine of (varname - centre) / 2. This transformation pulls in the tails and pushes out the middle of the distribution. For examples of this transformation, see Fisher (1993).
Examples
. circsummarize wallasp . circcentre wallasp, gen(wallasp2) . circcentre wallasp, gen(wallasp3) centre(45)
. circcentre orient, gen(relflow) centre(iceflow)
Author
Nicholas J. Cox, University of Durham, U.K. n.j.cox@durham.ac.uk
References
Fisher, N.I. 1993. Statistical analysis of circular data. Cambridge: Cambridge University Press.
Also see
On-line: help for circdiff, circsummarize