Skip to content

Commit

Permalink
use bracketing (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
jverzani authored Jan 2, 2023
1 parent 69b4d6d commit 9c02517
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PowerAnalyses"
uuid = "fee4b835-1841-44f8-82ea-42813857171a"
authors = ["Rik Huijzer <project.toml@huijzer.xyz>"]
version = "0.2.4"
version = "0.2.5"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
4 changes: 2 additions & 2 deletions src/power.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Return the minimum effect size for some test `T` with significance level `alpha`
"""
function get_es(T::StatisticalTest; alpha::Real, power::Real, n)
f(es) = get_alpha(T; es, power, n) - alpha
initial_value = 0.5
initial_value = (0, 10)
return find_zero(f, initial_value)
end

Expand All @@ -134,6 +134,6 @@ Return minimum sample size `n` for some test `T` with significance level `alpha`
"""
function get_n(T::StatisticalTest; alpha::Real, power::Real, es::Real)
f(n) = get_alpha(T; es, power, n) - alpha
initial_value = 50
initial_value = (2, 1000)
return find_zero(f, initial_value)
end

2 comments on commit 9c02517

@rikhuijzer
Copy link
Owner

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/74924

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 v0.2.5 -m "<description of version>" 9c025174891ad7de9e813ae824494e62ffcd2f99
git push origin v0.2.5

Please sign in to comment.