diff --git a/Project.toml b/Project.toml index 8989459..5bc259f 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "SafetySignalDetection" uuid = "ad9a3248-762c-4ade-a843-8f185e2c18ff" -authors = ["Daniel Sabanes Bove ", "Kristian Brock "] +authors = ["Daniel Sabanes Bove ", "Kristian Brock "] version = "0.0.1" [deps] diff --git a/test/test_fit_beta_mixture.jl b/test/test_fit_beta_mixture.jl index b0dff31..81c9e68 100644 --- a/test/test_fit_beta_mixture.jl +++ b/test/test_fit_beta_mixture.jl @@ -44,8 +44,8 @@ end @test mix_fit.components[1].β ≈ β₂ rtol = 0.1 @test mix_fit.components[2].α ≈ α₁ rtol = 0.1 @test mix_fit.components[2].β ≈ β₁ rtol = 0.1 - @test mix_fit.prior.p[1] ≈ 1 - π rtol = 0.01 - @test mix_fit.prior.p[2] ≈ π rtol = 0.01 + @test mix_fit.prior.p[1] ≈ 1 - π rtol = 0.1 + @test mix_fit.prior.p[2] ≈ π rtol = 0.1 end @testset "Check that fit_beta_mixture can fit the mean and standard deviation of samples well" begin @@ -54,6 +54,6 @@ end normal_dist = Normal(0.5, 0.05) y = rand(normal_dist, N) fit_y = fit_beta_mixture(y, 2) - @test mean(fit_y) ≈ mean(y) rtol = 0.02 + @test mean(fit_y) ≈ mean(y) rtol = 0.1 @test std(fit_y) ≈ std(y) rtol = 0.1 end diff --git a/test/test_fit_mle.jl b/test/test_fit_mle.jl index e6484b7..1df1fb7 100644 --- a/test/test_fit_mle.jl +++ b/test/test_fit_mle.jl @@ -27,6 +27,6 @@ @test mix_mle.components[1].β ≈ β₂ rtol = 0.1 @test mix_mle.components[2].α ≈ α₁ rtol = 0.1 @test mix_mle.components[2].β ≈ β₁ rtol = 0.1 - @test mix_mle.prior.p[1] ≈ 1 - π rtol = 0.01 - @test mix_mle.prior.p[2] ≈ π rtol = 0.01 + @test mix_mle.prior.p[1] ≈ 1 - π rtol = 0.1 + @test mix_mle.prior.p[2] ≈ π rtol = 0.1 end \ No newline at end of file