I planned to fit two Bernoulli random variables X, Y with a Gaussian copula, where X~Bernoulli(p1) and Y~Bernoulli(p2) (take p1= 0.2 and p2=0.5 for example) and the parameter of Gaussian copula (ρ) is 0.5.
Then the data generation process is
mymvd<-mvdc(normalCopula(0.5,dim = 2),margins = c("binom","binom"),
paramMargins = list(list(1, 0.5), list(1, 0.2)));
x_copula<-rMvdc(100,mymvd)
And I can generate the 100 replications of the data with Gaussian copula whose margins are Bernoulli distributions.
However, when I try to fit the parameter p1, p2 and ρ from the generated data x_copula, it didn’t work.
fitmvdc<-fitMvdc(x_copula,mymvd,start = c(1, 0.5, 1, 0.2 ,0.5))
Error in optim(start, loglikMvdc, mvdc = mvdc, x = data, method = method, :
initial value in 'vmmin' is not finite
I tried many kinds of cases of margins such as (continuous) exponential, normal, gamma, t, and (discrete) Poisson, geometric. For these margins, all worked well, but the only two cases when it doesn’t work are binomial and negative binomial margins.
Can anyone else give me some instructions?