Skip to content

Commit

Permalink
Add an abstract type HypothesisTest (#23)
Browse files Browse the repository at this point in the history
This is currently defined in HypothesisTests. Defining the common
supertype in this package would allow other packages to define their own
hypothesis test types that are too specific and/or have too many
dependencies to upstream to HypothesisTests. This could include, for
example, the log-rank test for comparing Kaplan-Meier survival curves in
Survival and the likelihood ratio test in StatsModels.
  • Loading branch information
ararslan authored Mar 28, 2023
1 parent 1efca7d commit 64d7d28
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/StatsAPI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ function pairwise end
# of the default definition.
function pairwise! end

"""
HypothesisTest
Abstract supertype for all statistical hypothesis tests.
Subtypes must implement [`pvalue`](@ref) at a minimum and may also
implement functions such as [`confint`](@ref), [`nobs`](@ref), and
[`dof`](@ref) as appropriate.
"""
abstract type HypothesisTest end

"""
pvalue(test)
Expand Down

2 comments on commit 64d7d28

@ararslan
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/80515

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.6.0 -m "<description of version>" 64d7d28315271f8d1cda793a05b37c4099de11ed
git push origin v1.6.0

Please sign in to comment.