I want to use the artificial intelligence algorithm to choose the appropriate copula function to build a mixture of copula-based on the initial sample data. I plan to choose 2 to 3 of the following six alternative copula functions to form a mixture copula: Gaussian, t, Clayton, Gumbel, Frank, and Joe copula. Initially, I planned to choose the first 2/3 copula functions by relying on the AIC criteria, but the effect was not good. So, is there any good AI algorithm that can implement this idea, Thanks!
library(copula)
### Input three-dimension data :
x1 <- rnorm(n=1000,mean = 0.5,sd = 0.1)
x2 <- rlnorm(n = 1000,meanlog = 0.5,sdlog = 0.01)
x3 <- runif(n = 1000,min = 0.2,max = 0.8)
data<-matrix(c(x1,x2,x3),1000,3)
data01<-pobs(data)
###First,Calculate copula parameters and AIC values
### noramla copula
nor.cop <- fitCopula(normalCopula(dim = 3), data1)
param_nor<-nor.cop@estimate
AIC_nor <- (-2)*(nor.cop@loglik)+2
### t copula
t.cop <- fitCopula(tCopula(dim = 3), data1)
param_t<- t.cop@estimate
AIC_t <- (-2)*(t.cop@loglik)+4
###clayton copula
clay.cop <- fitCopula(claytonCopula(dim = 3), data1)
param_cla<- clay.cop@estimate
AIC_cla <- (-2)*(clay.cop@loglik)+2
# alpha = 12.0343
###gumbel copula
gum.cop <- fitCopula(gumbelCopula(dim = 3), data1)
param_gum <- gum.cop@estimate
AIC_gum <- (-2)*(gum.cop@loglik)+2
# alpha = 7.02198
###frank copula
fra.cop <- fitCopula(frankCopula(dim = 3), data1)
param_fra <- fra.cop@estimate
AIC_fra <- (-2)*(fra.cop@loglik)+2
###joe copula
joe<-fitCopula(joeCopula(dim = 3),data1)
param_joe<- joe@estimate
AIC_joe <- (-2)*(joe@loglik)+2
###is any AI algorithm to select copula to construct the mixture
###OUTPUT:Suitable 2-3 copula functions