Skip to content

Commit

Permalink
Improve docs for power divergence, Chi-squared and LR tests (#114)
Browse files Browse the repository at this point in the history
Users looking for the chi-squared or LR tests will not necessarily know
that they are particular cases of the power divergence test. We do not
group different tests like that in other places.
  • Loading branch information
nalimilan authored and ararslan committed Sep 13, 2017
1 parent 454e3eb commit 5f0b40a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions docs/src/parametric.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
## Power divergence test
```@docs
PowerDivergenceTest
```

### Pearson chi-squared test
```@docs
ChisqTest
```

### Multinomial likelihood ratio test
```@docs
MultinomialLRT
```

Expand Down
8 changes: 4 additions & 4 deletions src/power_divergence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ PowerDivergenceTest(x::AbstractVector{T}; lambda::U=1.0, theta0::Vector{U} = one
"""
ChisqTest(x[, y][, theta0 = ones(length(x))/length(x)])
Perform a [`PowerDivergenceTest`](@ref) with ``λ = 1``, i.e. in the form of Pearson's
chi-squared statistic.
Perform a Pearson chi-squared test (equivalent to a [`PowerDivergenceTest`](@ref)
with ``λ = 1``).
If `y` is not given and `x` is a matrix with one row or column, or `x` is a vector, then
a goodness-of-fit test is performed (`x` is treated as a one-dimensional contingency
Expand Down Expand Up @@ -388,8 +388,8 @@ ChisqTest(x::AbstractVector{T}, theta0::Vector{U} = ones(length(x))/length(x)) w
"""
MultinomialLRT(x[, y][, theta0 = ones(length(x))/length(x)])
Perform a [`PowerDivergenceTest`](@ref) with ``λ = 0``, i.e. in the form of the likelihood
ratio test statistic.
Perform a multinomial likelihood ratio test (equivalent to a [`PowerDivergenceTest`](@ref)
with ``λ = 0``).
If `y` is not given and `x` is a matrix with one row or column, or `x` is a vector, then
a goodness-of-fit test is performed (`x` is treated as a one-dimensional contingency
Expand Down

0 comments on commit 5f0b40a

Please sign in to comment.