I am interested in finding an implementation (preferably in R but not necessary) to calculate earth mover's distance between two empirical distributions of circular data. My data are time points on a 24-hour clock under different treatments. I am not too familiar with circular statistics, so it would also be very helpful for me to get a brief explanation of how the calculation of EMD differs for circular distributions versus scale data.
sample data
These two vectors represent the times of day, rounded to the nearest hour, that an individual ant from a particular species was observed under two different temperature treatments.
x1 <- c(23, 3, 0, 8, 3, 10, 2, 23, 0, 23, 10, 12, 9, 0, 3, 23, 23,
10, 9, 23, 3, 23, 3, 2, 21, 0, 0, 2, 16, 23, 3, 21, 22, 21, 10,
23, 23, 23, 2, 3, 23, 3, 10, 10, 3, 23, 10, 2, 23, 10, 15, 3,
0, 10, 10, 13, 10, 18, 2, 8, 23, 2, 10, 0, 23, 23, 23, 2, 21,
16, 0, 23, 3, 10, 0, 3, 10, 23, 23, 3, 3, 10, 21, 0, 3, 15, 19,
0, 10, 21, 2, 21, 8, 23, 8, 9, 21, 3, 3, 3)
x2 <- c(20, 6, 10, 7, 7, 16, 20, 12, 6, 18, 15, 10, 10, 6, 10, 21,
10, 5, 12, 20, 12, 6, 0, 19, 0, 16, 20, 0, 5, 16, 6, 20, 12,
15, 7, 6, 16, 10, 12, 7, 5, 19, 16, 20, 5, 6, 15, 10, 16, 16,
20, 10, 20, 7, 7, 10, 20, 20, 10, 19, 0, 10, 10, 19, 12, 6, 19,
20, 0, 10, 12, 0, 7, 6, 10, 15, 16, 6, 6, 19, 10, 21, 20, 0,
15, 6, 10, 20, 7, 6, 10, 0, 16, 19, 6, 20, 10, 7, 12, 7)