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

Frank fix + coherence tests on Archimedeans + marginals tests on all copulas #65

Merged
merged 11 commits into from
Nov 16, 2023

Conversation

lrnv
Copy link
Owner

@lrnv lrnv commented Nov 15, 2023

@lrnv lrnv marked this pull request as draft November 15, 2023 19:31
@lrnv lrnv marked this pull request as ready for review November 16, 2023 20:11
@lrnv lrnv changed the title Fix Frank for high value of parameter Frank fix + coherence tests on Archimedeans + marginals tests on all copulas Nov 16, 2023
@lrnv
Copy link
Owner Author

lrnv commented Nov 16, 2023

@Santymax98 Look at the new tests, everything is working correclty even for FrankCopula(4,150), without the nasty approximation done in the R package. I also catched a few bugs in other copulas too. Once the tests pass we can merge this.

@Santymax98
Copy link
Contributor

Santymax98 commented Nov 16, 2023

@lrnv
That's great, I'm working a lot with the package, do you think that with those values, the density can be calculated? There are times that, in values for example F = FrankCopula(2.60)
and evaluate it in some style points, den = pdf(F,[0.70, 0.66]) gives an error like
DomainError with 1.0 t - 0.5 t² + 𝒪(t³): The 0-th order coefficient must be non-zero in order to expand `log` around 0.

Does that have to do with the amount of memory required?

@lrnv
Copy link
Owner Author

lrnv commented Nov 16, 2023

@Santymax98 Could you provide a simple piece of code that shows this error ? I could add it as a test here as i think this PR should solve it, but I am not sure.

Edit: I just added the test and it passes here. Do you have other interesting cases that we could test ? I guess that something more systematic could be done to check pdfs of all copulas at once, the random adding of tests that i am doing here is a bit messy

Copy link

codecov bot commented Nov 16, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (7b66c5f) 73.81% compared to head (fb27601) 75.87%.
Report is 1 commits behind head on main.

Files Patch % Lines
src/univariate_distributions/Logarithmic.jl 87.87% 4 Missing ⚠️
src/ArchimedeanCopulas/FrankCopula.jl 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #65      +/-   ##
==========================================
+ Coverage   73.81%   75.87%   +2.05%     
==========================================
  Files          28       28              
  Lines         550      572      +22     
==========================================
+ Hits          406      434      +28     
+ Misses        144      138       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Santymax98
Copy link
Contributor

Santymax98 commented Nov 16, 2023

I am very bad at writing code in this environment, I think it would be more useful for me to send it by email

@lrnv
Copy link
Owner Author

lrnv commented Nov 16, 2023

Yes no problem send it by mail or just copy/paste it here :) Know tha tyou can use triple-ticks blocs to format code here:

this is some julia(code)

try to edit this mesage to see the ticks

@lrnv
Copy link
Owner Author

lrnv commented Nov 16, 2023

I think I will merge this like that and then come back on another PR to fix the issue of the tests not passing on 1.6.

@lrnv lrnv merged commit d930e22 into main Nov 16, 2023
8 of 12 checks passed
@lrnv lrnv deleted the frank_issue_inf branch February 20, 2024 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gumbel with parameter > 10 problem with Copula Frank samples
2 participants