SIBER icon indicating copy to clipboard operation
SIBER copied to clipboard

Calculating Statistics on Centroids

Open linkx168 opened this issue 1 year ago • 2 comments

Hi Andrew, I hope you are well and thank you for providing many great resources for exploring community interactions. I was recently working with the vector statistics on centroids vignette and had a question that arose. In the vignette, to create the median arrow of the polar density plots you first find the medians of the angles/distances for each comparison, converting to the Cartesian system after. When I attempted this, my median arrows did not appear to align with the density of the tips of the arrow. In exploration, I converted the distances and angles first, taking the median of the arrow tips after. When I convert to the Cartesian system first, the median arrows appear to align with the density of points. From my perspective, converting the points first takes into account the angular and radial information for each vector together. When taking the median of angles and distances and then converting, the relationship is not considered.

I wanted to get your thoughts on this or if I was missing something in my data. The first picture I included below is the averaged angles/distances in the first step. The second picture is the conversion of angles/distances first. Thanks for the help!

image image

linkx168 avatar Jun 29 '23 16:06 linkx168

hi. Im sorry, I don't fully understand what process you have applied and exactly what the question or issue is. Could you provide a minimum working example and indicate if you suspect an issue or mistake with my vignette or if this is a more general question. http://adv-r.had.co.nz/Reproducibility.html best wishes Andrew

AndrewLJackson avatar Jun 30 '23 08:06 AndrewLJackson

Apologies for the confusion, here is a worked example. I am making note of how the median arrow is calculated in the vignette. In the vignette, the median of distances and angles is done before converting to the Cartesian system. This seems to lead to misguided median arrows with respect to where the highest density of arrow tips are. I provide a chunk of code that converts distances and angles to the Cartesian system first, taking the medians for the arrow after. These arrows point in a direction that appears more reasonable with respect to the density of arrow tips.

I have provided knitted output.

Siber_Example.pdf

linkx168 avatar Jun 30 '23 14:06 linkx168