Hey all, I'm trying to construct a 7-dimensional normal copula using the copula package. I'd like to supply as parameter a randomly generated correlation matrix (that I'll convert to a vector so I can feed it to the normalCopula function). What order do the pairwise correlations inside that vector have to be in? In other words: What does the normalCopula function "expect"? Thanks!
Copula package - normalCopula() param order
2 messages · Lucas Holland, Martin Maechler
2 days later
Lucas Holland <hollandlucas at gmail.com>
on Sun, 17 Mar 2013 16:26:41 +0100 writes:
> Hey all,
> I'm trying to construct a 7-dimensional normal copula using the copula package. I'd like to supply as parameter a randomly generated correlation matrix (that I'll convert to a vector so I can feed it to the normalCopula function). What order do the pairwise correlations inside that vector have to be in? In other words: What does the normalCopula function "expect"?
The lower triangular part of the matrix.
More specifically,
If
P <- cor(X)
it is
P[lower.tri(P)]
The next version of the copula package will have a utility
function, (at least semantically) equivalent to
P2p <- function(P) P[lower.tri(P)]
for this purpose, and another one, p2P() for the other way
around.
Best regards,
Martin Maechler, ETH Zurich