Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculating Statistics on Centroids #96

Open
linkx168 opened this issue Jun 29, 2023 · 2 comments
Open

Calculating Statistics on Centroids #96

linkx168 opened this issue Jun 29, 2023 · 2 comments

Comments

@linkx168
Copy link

linkx168 commented Jun 29, 2023

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

@AndrewLJackson
Copy link
Owner

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

@linkx168
Copy link
Author

linkx168 commented Jun 30, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants