ENH: Add rotated copula CDF helper (_rotate_cdf) and tests#9681
Open
kudos07 wants to merge 2 commits intostatsmodels:mainfrom
Open
ENH: Add rotated copula CDF helper (_rotate_cdf) and tests#9681kudos07 wants to merge 2 commits intostatsmodels:mainfrom
kudos07 wants to merge 2 commits intostatsmodels:mainfrom
Conversation
Implements 0°, 90°, 180°, and 270° rotation formulas for Archimedean copulas as described in Klein et al. (2019, Section 2.4). Includes tests verifying numerical range and monotonicity for rotated Clayton copula.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @josef-pkt
This PR adds the first stage of the rotated copula implementation, focusing only on the CDF rotation helper.
This is mainly to show the approach and structure, if this looks fine, I will proceed to add the PDF and RVS rotation helpers next.
Summary
The conventions follow Joe (1997) and VineCopula.
Formulas implemented:
C90(u, v) = u - C(u, 1 - v)
C180(u, v) = u + v - 1 + C(1 - u, 1 - v)
C270(u, v) = v - C(1 - u, v)
Klein et al. (2019) use an opposite rotation orientation, so their 90° and 270° labels are reversed, but the results are mathematically identical.
Implementation details
Testing
Debugging notes
Next steps
Verification
Plan to cross-check rotated CDF values against the R package VineCopula::BiCopCDF for corresponding rotated families (for example, family codes 13 and 14 for 180° rotations) to confirm numerical consistency.
Thanks,