diff --git a/.github/workflows/Tier1.yml b/.github/workflows/Tier1.yml index 4b43cdd..032688a 100644 --- a/.github/workflows/Tier1.yml +++ b/.github/workflows/Tier1.yml @@ -27,11 +27,11 @@ jobs: julia-arch: [x64] os: [ubuntu-latest, macOS-latest, windows-latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: julia-actions/setup-julia@v1 with: version: ${{ matrix.julia-version }} - - uses: julia-actions/julia-buildpkg@master + - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 if: ${{ matrix.os == 'ubuntu-latest' && matrix.julia-version == '1.8' && matrix.arch == 'x64' }} diff --git a/Project.toml b/Project.toml index a519829..9e4790e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MetidaFreq" uuid = "bd16ee1e-1b2f-4f89-b253-604a522f8c5f" authors = ["PharmCat "] -version = "0.1.3" +version = "0.1.4" [deps] @@ -19,11 +19,11 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" CategoricalArrays = "0.8, 0.9, 0.10" Distributions = "0.19, 0.20, 0.21, 0.22, 0.23, 0.24, 0.25" -HypothesisTests = "0.10" -MetidaBase = "0.11" +HypothesisTests = "0.10, 0.11" +MetidaBase = "0.11, 0.12" Optim = "1" Roots = "1, 2" -StatsBase = "0.27, 0.28, 0.29, 0.30, 0.31, 0.32, 0.33" +StatsBase = "0.30, 0.31, 0.32, 0.33, 0.34" Tables = "1" julia = "1" diff --git a/src/confint.jl b/src/confint.jl index d2747e4..706eea3 100644 --- a/src/confint.jl +++ b/src/confint.jl @@ -8,6 +8,8 @@ Wilcox, R. R. (2005) Introduction to robust estimation and hypothesis testing. E """ propci(x::Int, n::Int; level = 0.95, method = :default) +Proportion confidence interval. + `method`: - `:wilson` | `:default` - Wilson's confidence interval (CI) for a single proportion (wilson score) (Wilson, 1927); @@ -168,6 +170,8 @@ end """ orci(x1, n1, x2, n2; level = 0.95, method = :default) +Odd ratio confidence interval. + - `:mn` - MN Score (Miettinen&Nurminen, 1985); - `:fm` | `:mee` - FM (same as MN Score, but not multiplied on `(n1 + n2) * (n1 + n2 - 1)`) (Mee RW, 1984; Farrington&Manning, 1990); - `:woolf` - Woolf logit (Woolf, 1955); @@ -224,6 +228,8 @@ end """ rrci(x1, n1, x2, n2; level = 0.95, method = :default) +Risk ratio confidence interval. + - `:mn` - Miettinen-Nurminen Score interval (Miettinen&Nurminen, 1985); - `:fm` | `:mee` - FM Score interval (Mee RW, 1984; Farrington&Manning, 1990); - `:cli` - Crude log interval, Gart (Gart&Nam, 1988); @@ -307,6 +313,8 @@ function mpropci(contab::ConTab; level = 0.95, method = :default) end """ oddsci(xa, xb; level = 0.95, method = :default) + +Confidence interval for odd where total number n = xa + xb. """ function oddsci(xa, xb; level = 0.95, method = :default) # !!! NEED CHECK !!! alpha = 1 - level