Note: I recognize that my question is strongly related to How to define a new copula distribution family, but it seems that there was no clear answer there, and the suggestions given were to simply construct a new customized ProbabilityDistribution, but then that defeats the point of using CopulaDistribution.

For the function CopulaDistribution, one can select a kernel ker from the list that is documented here https://reference.wolfram.com/language/ref/CopulaDistribution.html. But this list of copulas is clearly very restrictive. In fact, it ignores substantial amount of research that expands the types of copula functions that are permitted. I still want to use the great flexibility afforded by CopulaDistribution with Mathematica, in particular that I can just directly substitute in my desired marginals constructed from a univariate ProbabilityDistribution type object; so really, if possible, I would really like to avoid the numerous hassles dealing with constructing a customized multivariate ProbabilityDistribution.

Question: Is it possible to input a customized copula kernel ker in CopulaDistribution? If so, how?


1 Answer 1


Apparently not, or at least not without some significant effort to modify the CopulaDistribution function.

Looking at the definition of CopulaDistribution and the functions it relies on (in Statistics`CopulaDistributionDump` context), all of the kernels are handled individually as special cases, and anything not matching one of these cases is explicitly disallowed. The function that allows or disallows the different kernel specification is Statistics`CopulaDistributionDump`validCopulaQ, for which you can view the definition in the usual ways.

However, modifying this function to accept other specifications will not help, because the underlying implementation still will not know what to do with your kernel unless you add new definitions for that distribution under (at least) Statistics`Library`CopulaKernelFunction (which contains the actual definitions of the kernels) and Statistics`CopulaDistributionDump`iCopulaCDF (which describes how to derive the CDFs of distributions based on these kernels), along with several functions giving the PDFs for various combinations of discrete and continuous marginals. There are additional special-case functions for sampling these distributions, such as e.g. Statistics`CopulaDistributionDump`iClaytonRandomReal.

No doubt, if you were very committed, you could add support for another kernel. Unfortunately, the process will be severely frustrated by the fact that the code for CopulaDistribution and its support functions is defined in an MX file, and so not viewable in plain text complete with comments, and also not straightforwardly modifiable without patching the in-memory definitions.

  • $\begingroup$ Thanks for the extended clarifications and discussions. From the users' perspective, it seems that the addition of CopulaDistribution to Mathematica is somewhat misleading then, given that it is highly restricted in its scope. I hope that future versions of Mathematica can rectify this. As it stands right now, constructing a customized multivariate ProbabilityDistribution is very much of a hassle (at least for me). Overall, I think the probability related functions in Mathematica 10 are really poorly implemented; i.e. gives no warning or errors when things are done "wrong". Thanks again! $\endgroup$
    – user32416
    Sep 20, 2015 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.