0

I'm using the circular package in R and some of the functions are pretty straightforward for my purposes. mean(vector1,na.rm = TRUE) boom, done. sd(vector1, na.rm = TRUE) boom, done.

I have 42 bearings I'm analyzing and they can be found in pretty much any direction, but I'm hoping they trend in a particular way. I thought I trusted the mean, but then when I ran the SD it gave me a result of 2.2 degrees. My understanding of SDs is that 2.2 is too small to cover the wide range in bearings I have.

Is there something different about angular SDs? Or do I have the parameters set incorrectly? Are the results I'm getting accurate?

anglecir.nest
Circular Data: 
Type = angles 
Units = degrees 
Template = geographics 
Modulo = 2pi 
Zero = 1.570796 
Rotation = clock 
 [1] 318 306 334 120  38 323 219 140 129 148  41 176 301 261 230 118 211 357 268 203 180 218 308 236 176  65  33 187  48 127  50 28 348 191 208 190 344 278  24  14 298 348

Mean 272.937784889062 SD 2.23099490661604

So, if you wanted to try this for yourself in the circular package, this is the code you could use:

anglecir.nest <- c(318, 306, 334, 120,  38, 323, 219, 140, 129, 148,  41, 
176, 301, 261, 230, 118, 211, 357, 268, 203, 180, 218, 308, 236, 176,  65,  
33, 187,  48, 127,  50, 28, 348, 191, 208, 190, 344, 278,  24,  14, 298, 348)

mean(anglecir.nest, na.rm=TRUE)
sd(anglecir.nest, na.rm=TRUE)
PIJA
  • 21
  • 5
  • 1
    Well "correct" based on what definition? How do you want to define the standard deviation? It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Apr 26 '19 at 15:45
  • Well, in standard statistics, 3 SDs cover about half of the sample. I was expecting my SD in this example to be somewhere closer to the double digits, but I don't know if being a closed circle results in a different definition of SD. – PIJA Apr 26 '19 at 17:10
  • It'd be nice if you'd put the code in your question to convert `anglecir.nest` to a `circular` object. Seems like we need to specify at least `units = "degrees"`, are there any other settings you're making? – Gregor Thomas Apr 26 '19 at 17:51
  • Playing around a little bit, it seems like `sd.circular` might always return the answer in radians, even if the input is degrees. Doesn't seem to be documented, but if I convert your degrees to radians, I get the same `2.23` standard deviation. If we assume 2.23 is radians, that's equivalent to about 128 degrees. – Gregor Thomas Apr 26 '19 at 17:56
  • 2
    But also be careful about your rules of thumb. In "standard statistics", how much a standard deviation covers depends strongly on the distribution. For a normal distribution, mean +/- 3 SDs covers 99% of the data. For a small sample from a possibly non-normal distribution, I wouldn't place much stock in that. – Gregor Thomas Apr 26 '19 at 17:59
  • I removed my answer. I think @Gregor has a better handle on it. – hmhensen Apr 26 '19 at 18:31
  • I am going to assume that the answer is getting spit out in radians, even though the vector data suggests that it has been converted to degrees. Thank you. – PIJA Apr 26 '19 at 18:55

1 Answers1

2

The output of sd.circular is likely in radians, even though the data is entered in degrees. Something to watch for if you use this package.

PIJA
  • 21
  • 5