I have three variables with correlation coefficient of respectively 0.3; -0.2 and 0.1.
I want to fit a T copula but when I use the fitCopula function it gives me a single value for rho, which leads to a poor fit to the data.
zCop<-tCopula(dim=3)
set.seed(500)
m <- pobs(as.matrix(cbind(IG, HY,GOV)))
fit <- fitCopula(zCop,m,method='ml')
coef(fit)
rho.1 df
0.06940047 6.30347241
I have tried to fit bivariate copulas for each couple, and in that case the rho is close to the empirical one, but I get very different results for the df which can only be a single parameter.
When I do IG,HY I get the following, which is close to the empirical correlation:
zCop<-tCopula(dim=2)
set.seed(500)
m <- pobs(as.matrix(cbind(IG,HY)))
cor(m, method="spearman")
fit <- fitCopula(zCop,m,method='ml')
coef(fit)
rho.1 df
0.3417333 10.6678394
I wonder whether I could impose the correlation structure and then use the df estimated from the multivariate copula (6.3 here) as down below (weher coef1 is the rho fitted for IG-HY, coef2 for IG-GOV and coef3 for HY-GOV)
u <- rCopula(3965,tCopula(dim=3,c(coef1,coef2,coef3),df=6.3,dispstr='un'))
I wonder whether I could use this:
zCop<-tCopula(dim=3, dispstr = 'un')
set.seed(500)
m <- pobs(as.matrix(cbind(IG, HY,GOV)))
fit <- fitCopula(zCop,m,method='itau.mpl')
coef(fit)
rho.1 rho.2 rho.3 df
0.33823924 -0.19170082 0.07088704 13.89581598
Best Answer
I have tried to fit bivariate copulas for each couple
The nice way to model multivariate data fitting bivariate copula for each pair of variables is using pair-copula models. Pair-copula models fit only bivariate copula (pair-copula) for each pair of variables at a time. Using VineCopula or CDvine packages you can nicely fit a C-vine model (one sub-class) of pair-copula models to your data using only t-copula family. As you did not provide your data, then I cannot help you with further information about the R code. Try one of the two listed packages. I am happy to help if you need further help.