My goal is to calculate a mean and standard deviation for a series of compass degrees. Since I may cross the 360/ 0 mark, I can't use the a standard mean or sd calculation.
I've been using the circular packing in R, which seems to give me the correct means (though negative values are used when crossing the 360 mark as opposed to positive). But the sd values are way too small. Any thoughts on what might be wrong, or a better way to calculate mean and sd for compass directions?
The below code is my attempt to test my calculations of mean and sd on various compass directions, and compare to a standard mean and sd calculation (they should agree unless I cross the 360/ 0 mark)
library(circular)
Tester<-c(20,40,60)
Tester<-c(340,360,20)
Tester<-c(340,0,20)
Tester<-c(300,320,340)
Tester<-c(160,180,200)
ToCirc<- circular(Tester, type="angles", units="degrees",rotation="clock")
mean(ToCirc)
sd(ToCirc)
mean(Tester)
sd(Tester)