Skip to content

Commit 64d7d28

Browse files
authored
Add an abstract type HypothesisTest (#23)
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.
1 parent 1efca7d commit 64d7d28

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/StatsAPI.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ function pairwise end
3232
# of the default definition.
3333
function pairwise! end
3434

35+
"""
36+
HypothesisTest
37+
38+
Abstract supertype for all statistical hypothesis tests.
39+
Subtypes must implement [`pvalue`](@ref) at a minimum and may also
40+
implement functions such as [`confint`](@ref), [`nobs`](@ref), and
41+
[`dof`](@ref) as appropriate.
42+
"""
43+
abstract type HypothesisTest end
44+
3545
"""
3646
pvalue(test)
3747

0 commit comments

Comments
 (0)