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

Chacko_test_1xc #36

Closed
2 tasks done
wleoncio opened this issue Nov 8, 2022 · 0 comments
Closed
2 tasks done

Chacko_test_1xc #36

wleoncio opened this issue Nov 8, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@wleoncio
Copy link
Member

wleoncio commented Nov 8, 2022

The following code causes an error:

Chacko_test_1xc(c(6,8,4,7,3))

Error in if (nt[i] > nt[i + 1]) { : argument is of length zero

The problem beind that at one point i = 0, so nt[i] is a zero-length vector. The loop probably needs some refactoring

  • Add more tests to the function to make sure the original calculations are preserved
  • Refactor loop so that Chacko_test_1xc(c(6,8,4,7,3)) works.

Credit to Prof. Graeme Ruxton (Univ. of St. Andrews) for finding the bug.

@wleoncio wleoncio added the bug Something isn't working label Nov 8, 2022
@wleoncio wleoncio self-assigned this Nov 8, 2022
wleoncio added a commit that referenced this issue Nov 10, 2022
The test statistic is asymptotically chi-square with m - 1 d.f., so the added restriction makes sense so that d.f. is positive
wleoncio added a commit that referenced this issue Nov 10, 2022
@wleoncio wleoncio mentioned this issue Nov 23, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant