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

Correlation test #214

Merged
merged 4 commits into from
Nov 1, 2020
Merged

Correlation test #214

merged 4 commits into from
Nov 1, 2020

Conversation

nklb
Copy link
Contributor

@nklb nklb commented Oct 7, 2020

This PR adds the correlation test for two vector inputs x and y. It

  • adds an according constructor for the CorrelationTest struct
  • extends the docstring and modifies the title in the documentation
  • adds a test using the already present file nutrient.txt (I've made sure to get the same output as cor.test in R)
  • fixes the naming of the test (we test for partial correlation instead of correlation if k !=0, it was the other way around)

@@ -47,10 +60,10 @@ struct CorrelationTest{T<:Real} <: HypothesisTest
end

testname(p::CorrelationTest) =
string("Test for nonzero ", p.k == 0 ? "partial " : "", " correlation")
string("Test for nonzero ", p.k != 0 ? "partial " : "", "correlation")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh!

@mschauer mschauer mentioned this pull request Oct 9, 2020
@nalimilan
Copy link
Member

Thanks!

@nalimilan
Copy link
Member

I've tagged 0.10.2: JuliaRegistries/General#24290

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

Successfully merging this pull request may close these issues.

None yet

3 participants