[R] calculating mean direction (CircStats)
Martin Maechler
maechler at stat.math.ethz.ch
Mon Feb 24 17:32:52 CET 2003
>>>>> "Cordula" == Cordula Becker <cbecker at psy.uni-muenchen.de>
>>>>> on Fri, 21 Feb 2003 20:39:00 +0100 writes:
Cordula> Hi, I've currently to work with some circular
Cordula> data. Unfortunately I'm not very familiar with
Cordula> circular statistics and would really appreciate if
Cordula> I could get some help concerning the CircStats
Cordula> package this way.
Cordula> My data lies in the range 0 to 2*pi, and is
Cordula> transformed to radians (as expected by the
Cordula> CircStats methods). Calculating the mean direction
Cordula> (circ.mean) results for some datasets in a negative
Cordula> mean direction like -0.8309982. I think that this
Cordula> might be wrong. If it is correct, what is the
Cordula> meaning of a negative mean direction?
It's in (-pi, pi] which is as valid as (0, 2*pi].
As a matter of fact, any angle is valid; it's just they are
periodic, i.e., phi + 2*k*pi is equivalent to phi for any
k in Z = { .... -1,0,1,.... }p.
Cordula> I also read that some transformation of the data
Cordula> might be necessary to get the correct mean
Cordula> direction (multiplying all angles by two and taking
Cordula> the modulus of these angles and 360°). I manage to
Cordula> do so, but I'm not sure about how to back-transfer
Cordula> the mean direction I'm getting as a result to the
Cordula> angles of my original data.
I don't think that the CircStats package has any of those
restrictions for input.
It *is* important to use "radians", not "degrees" though
(I say this, since you mention 360° above).
I hope this helps,
Martin
Martin Maechler <maechler at stat.math.ethz.ch> http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27
ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND
phone: x-41-1-632-3408 fax: ...-1228 <><
More information about the R-help
mailing list