I have a dataset with the number of occurrences by month and would like to calculate the centre of the distribution/mean month. If possible, I would also like to have confidence intervals.
I have read the manuals for circular and CircStats
and have looked at similar questions here and here.
I managed to get a seemingly sensible result in some cases but not in others and have not yet figured out how to calculate the confidence interval.
To illustrate my point, here is some dummy data:
library(CircStats)
# The number of observations by month (Jan-Dec):
obsMonths1 <- c(12,15,1,2,3,1,1,4,1,2,7,1)
obsMonths2 <- c(1,1,1,1,2,10,11,2,1,1,2,1)
# Convert data to radians:
obsRadians1 <- (obsMonths1/12*2)*pi
obsRadians2 <-(obsMonths2/12*2)*pi
# Calculate circular mean:
mean1 <- circ.mean(obsRadians1-1)#assume January is 0
mean2 <- circ.mean(obsRadians2-1)#assume January is 0
# Convert radians to months:
mean1*12/(2*pi)+12
mean2*12/(2*pi)+12
For the first set of observations the answer seems sensible, but for the second set of observations it should be July-August.