HypothesisTests.jl
HypothesisTests.jl copied to clipboard
Subtypes of HypothesisTest can have optional fields :tail and :alpha
This enables the specification of tail (left/right/both) and alpha value in the constructors of HypothesisTest subtypes:
using HypothesisTests
EqualVarianceTTest(x, y, alpha=0.0025, tail=:right)
Since the additional arguments of the constructors are named arguments, nobody using this package has to change his constructor calls. Defaults are used so that the package works just as before when the optional arguments are not provided.
Currently, the new optional functionality of this pull request is only implemented for the t-tests. Other subtypes of HypothesisTest can easily follow the adaptations of src/t.jl.
I am looking forward to your comments! Mirko
Note that this pull request was already present as pull request #99. Since there was a problem with the Travis build routine, I reopen that pull request here.
Thank you very much, @nalimilan, for your detailed review! I implemented all changes you requested and even learned about some other nice features of Julia during the process. Docs and Unit tests are updated.
See my comments for more information and please let me know, if there is anything else to change.
Please note that the Travis build failed for julia:nightly because the package Rmath (and thus also StatsFuns and Distributions, on which this package depends) could not be precompiled.
I hope this is no problem for this pull request. The REQUIRE file states that only julia 0.5 is meant to be supported.