From e4980f34b04fdf5a61700d94a24c49173166e59e Mon Sep 17 00:00:00 2001 From: Oskar Laverny Date: Thu, 30 Nov 2023 10:39:46 +0100 Subject: [PATCH] first shot at a test, not working --- test/archimedean_tests.jl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/archimedean_tests.jl b/test/archimedean_tests.jl index e1f6b8f8..7de0e69e 100644 --- a/test/archimedean_tests.jl +++ b/test/archimedean_tests.jl @@ -286,6 +286,27 @@ end @test true end +@testitem "PowerGenerator - sampling,pdf,cdf,fit" begin + using StableRNGs + using Distributions + rng = StableRNG(123) + for d in 2:10 + for G ∈ ( + Copulas.GumbelGenerator(1.7), + Copulas.ClaytonGenerator(1.8), + # others ? + ) + C = ArchimedeanCopula(d,Copulas.PowerGenerator(G,1,2)) + # C = InvGaussianCopula(d,θ) + data = rand(rng,C,100) + # @test all(pdf(C,data) .>= 0) + # @test all(0 .<= cdf(C,data) .<= 1) + # fit(GumbelCopula,data) + end + end + @test true +end + @testitem "Testing empirical tail values of certain copula samples" begin using StableRNGs using Distributions