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

CompatHelper: bump compat for Documenter to 1 for package docs, (keep existing compat) #309

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "0.27"
Documenter = "0.27, 1"
bkamins marked this conversation as resolved.
Show resolved Hide resolved
7 changes: 6 additions & 1 deletion docs/src/methods.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Methods

This page documents the generic `confint` and `pvalue` methods which are supported
This page documents the generic `confint`, `pvalue` and `testname` methods which are supported
by most tests. Some particular tests support additional arguments: see the
documentation for the relevant methods provided in sections covering these tests.

Expand All @@ -13,3 +13,8 @@ confint
```@docs
pvalue
```

## Test name
```@docs
testname
```
4 changes: 2 additions & 2 deletions src/anderson_darling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function show_params(io::IO, x::KSampleADTest, ident = "")
x.nsim != 0 && println(io, ident, "number of simulations: $(x.nsim)")
end

"""Monte-Carlo simulation of the p-value for AD test"""
# Monte-Carlo simulation of the p-value for AD test
function pvaluesim(x::KSampleADTest)
Z = sort(x.samples)
Z⁺ = unique(Z)
Expand Down Expand Up @@ -172,7 +172,7 @@ const TK = [-1.1926243990804033 -1.1743913869790086 -1.165614653421677 -1.13925
-2.569928572144317 -2.4656196647138655 -2.4014758345752387 -2.236262068336355 -2.158516518380391 -1.923673308482446 -1.7979065748604046 -1.5997846679626186 -1.4103321257056918 -1.2784135432631765 -1.1717696031635132 -0.8499132658320339 -0.5943484194811337 -0.35694312707262416 -0.1214887880639173 0.13112100670750404 0.4191870332071281 0.7814077014565005 1.3316584559236748 1.5432210796311716 1.8266084594238228 2.2920622811804403 2.856304977260614 3.0300396084181944 3.2684205939333277 3.664624203263345 4.176983049634148 4.326393560377753 4.552857168246306 4.92111391208768 5.502216961106142 5.636662090993625 5.850215772428456 6.1557325597112955 6.609738032513054;
-2.972701482938346 -2.812945948534419 -2.7269368807141112 -2.505073465280368 -2.3962139122991437 -2.099707039134466 -1.9451305240930674 -1.7042574729580975 -1.4825402524085212 -1.330796855221357 -1.2110926561356254 -0.8546019664189122 -0.5788952082877374 -0.33039963362646674 -0.08728908009829067 0.16763773343275448 0.4519318546878791 0.8027235952910927 1.3216636485933564 1.5182514190293643 1.7792399561819003 2.196289357383261 2.704436161637905 2.8602211164423332 3.071314876385227 3.4161591494006935 3.856086976310044 3.999063549670627 4.180960369206441 4.484057207941962 4.871734136391144 5.018239006694096 5.187665970098557 5.479057559707716 5.841992903950639]

"""Asymptotic evaluation of the p-value for Anderson-Darling test"""
# Asymptotic evaluation of the p-value for Anderson-Darling test
function pvalueasym(x::KSampleADTest)
# Computational Details:
#
Expand Down
39 changes: 18 additions & 21 deletions src/durbin_watson.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,27 +91,24 @@ function show_params(io::IO, x::DurbinWatsonTest, ident)
println(io, ident, "DW statistic: ", x.DW)
end

"""
pan_algorithm(a::AbstractArray, x::Float64, m::Int, n::Int)

Compute exact p-values for the Durbin-Watson statistic using Pan's algorithm (Farebrother,
1980).

`a` is the vector of non-zero Eigenvalues of ``(I-(X(X'X)^{-1}X'))A`` (see Durbin and
Watson, 1971, p. 2), `x` is the value of the Durbin-Watson statistic, `m` the number of
elements in `a`, and `n` the number of approximation terms (see Farebrother, 1980, eq. 5).

# References

* J. Durbin and G. S. Watson, 1971, "Testing for Serial Correlation in Least Squares
Regression: III", Biometrika, Vol. 58, No. 1, pp. 1-19,
[http://www.jstor.org/stable/2334313](http://www.jstor.org/stable/2334313).
* R. W. Farebrother, 1980, "Algorithm AS 153: Pan's Procedure for the Tail Probabilities
of the Durbin-Watson Statistic", Journal of the Royal Statistical Society, Series C
(Applied Statistics), Vol. 29, No. 2, pp. 224-227,
[http://www.jstor.org/stable/2986316](http://www.jstor.org/stable/2986316).

"""
# pan_algorithm(a::AbstractArray, x::Float64, m::Int, n::Int)
#
# Compute exact p-values for the Durbin-Watson statistic using Pan's algorithm (Farebrother,
# 1980).
#
# `a` is the vector of non-zero Eigenvalues of ``(I-(X(X'X)^{-1}X'))A`` (see Durbin and
# Watson, 1971, p. 2), `x` is the value of the Durbin-Watson statistic, `m` the number of
# elements in `a`, and `n` the number of approximation terms (see Farebrother, 1980, eq. 5).
#
# # References
#
# * J. Durbin and G. S. Watson, 1971, "Testing for Serial Correlation in Least Squares
# Regression: III", Biometrika, Vol. 58, No. 1, pp. 1-19,
# [http://www.jstor.org/stable/2334313](http://www.jstor.org/stable/2334313).
# * R. W. Farebrother, 1980, "Algorithm AS 153: Pan's Procedure for the Tail Probabilities
# of the Durbin-Watson Statistic", Journal of the Royal Statistical Society, Series C
# (Applied Statistics), Vol. 29, No. 2, pp. 224-227,
# [http://www.jstor.org/stable/2986316](http://www.jstor.org/stable/2986316).
function pan_algorithm(a::AbstractArray, x::Float64, m::Int, n::Int)

ν = findfirst(ai -> ai >= x, a)
Expand Down