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

Join count tail-ness #48

Closed
ljwolf opened this issue Dec 4, 2018 · 7 comments
Closed

Join count tail-ness #48

ljwolf opened this issue Dec 4, 2018 · 7 comments

Comments

@ljwolf
Copy link
Member

ljwolf commented Dec 4, 2018

Our join count implementation for black-white tests only looks for negative spatial autocorrelation by default (i.e. if the observed black-white joins are substantially larger than simulated black-white joins). We should probably provide an option for two-tailed testing, since this seems to be a reasonable default assumption, that autocorrelation might be positive or negative.

@sjsrey
Copy link
Member

sjsrey commented Dec 5, 2018

+1.

It is actually an interesting testing problem as there are three component tests (WW, BW, BB) and one could think about joint versus marginal tests, as well as one and two-sided tests for each variant.

@ljwolf
Copy link
Member Author

ljwolf commented Dec 5, 2018

Yeah, I agree it's pretty interesting and open... I like thinking about the cross-color joins, but any might be useful. I think the right test for the bb/ww is on all same-color joins (BB +WW) rather than bb/ww alone.

And, thinking multivariate, the cross-color and same-color tests would be reasonable first steps, too.

Idk, just hit this when writing some teaching stuff, so figured I'd log it!

@ljwolf
Copy link
Member Author

ljwolf commented Jul 13, 2019

Hmm @rose-pearson, I can't assign this to you for some reason. Let's just tag your name here & that'll serve to let others know you've got this 😅

@rose-pearson
Copy link
Collaborator

Hi @ljwolf , I'm just working through this issue.

I have made the code changes that I believe are required to access the positive and negative autocorrelations.

I am now working through the quired additions to the tests. I was just wondering if there is a reason why the 'test_by_col' test in 'test_join_counts.py' only creates a limited subset of outcomes. i.e. is their a reason not to extend the outcomes to outvals = ['bb', 'bw', 'ww', 'p_sim_bw', 'p_sim_bb'] from outvals = ['bb','p_sim_bw', 'p_sim_bb']. Thanks!

@ljwolf
Copy link
Member Author

ljwolf commented Jul 13, 2019

I wouldn't extend that test. That test only checks that the statistic correctly processes columns of dataframes using the by_col method. It's not as important for that test to duplicate the effort done to ensure the actual statistic is correct. That occurs earlier in the test_join_counts.py file.

If the numerical results are correct for the test you write for the positive autocorrelation test, then the by_col method will just check that it by_col correctly applies the statistic across a dataframe.

@rose-pearson
Copy link
Collaborator

Great. That definitely makes sense. I just wanted to make sure that was the case. Thanks.

@ljwolf
Copy link
Member Author

ljwolf commented Jul 13, 2019

rad, thanks for checking!

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

No branches or pull requests

3 participants