fit a copula to the empirical data (3 variables)

601 views Asked by At

I have 3 variables (temperature, consumption, price) and i want to fit a copula to the data. I used the package fitCopula. It works for normalCopula and tCopula but not for archimedean copulas (frank, clayton, gumbel)

fitCopula(frankCopula(dim=3), data = emp_data)
´´´

The error is: 

Error in fitCopula.ml(copula, u = data, method = method, start = start,  : 
  'start' contains NA values
2

There are 2 answers

0
mccurcio On
  1. Consider transforming your data using a monotonic transformation, such as the inverse hyperbolic sine transformation, which can transform negative correlations into positive correlations.
  2. Once you have transformed your data, try fitting a Clayton copula or other methods.
  3. Use a different copula family that can handle negative dependence, such as the Gaussian copula or the Student's t copula.
4
AudioBubble On

Multivariate copula imposes the same dependency among all variables, which is not the case for most of the data. Moreover, for negative correlation you can use the rotation version of the Clayton.

For your case, and since you have three variables, you should use regular vine copula from the VineCopula package in R. You can use Rvinestructureselect() function to do everything for you; select the order of the variables, the best fit copula function for each two variables, and estimate the parameters.