I am trying to get some nice contour plots of various Copulas with Gaussian marginals, but somehow I do not at all get what I would expect - what am I doing wrong ?
My R code:
library(copula)
library(mvtnorm)
#Gaussian Density & distribution
G_copula = norm.cop <- normalCopula(0.70)
cp <- contour(G_copula, dCopula, n=200, nlevels=20, delta=0.01)
persp(G_copula, dCopula)
contour(cp$x,cp$y,cp$z)
contour(qnorm(cp$x),qnorm(cp$y),cp$z)
If you want the contours plot of the copula with margins N(0,1) and N(0,1), one option is to "manually" define its density:
Then you can use the usual
contour
function.But it's easier to create this distribution with
mvdc
:Then you can directly call
contour
on this multivariate distribution: