1

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?

LI cy
  • 31
  • 2
  • 1
    It seems difficult to conceive the notion of a transform of two discrete variates that would turn them into a continuous variate. – Xi'an Jul 26 '20 at 09:52
  • Actually, for any two random variables, whether discrete or not, as long as we know their marginal distributions and joint distribution, we can found the copula. My question is how to fit the parameters by the generated data. The package fitMvdc doesn't work when the margins are binomial and negative binomial only. – LI cy Jul 26 '20 at 13:05
  • Using a copula for the Bernoulli case is overkill: see https://stats.stackexchange.com/a/318935/919 for a comprehensive solution. The issue with the negative binomial is probably something you should take up with the software maintainers. – whuber Jul 28 '20 at 14:25
  • Thanks for sharing, whuber. The linkage you shared is to fit the correlation between d Bernoulli random variables. But I have a question, "What's the meaning of 'overkill'? " Does it mean copula is not the best way to characterize the correlation between two Bernoulli random variables? – LI cy Jul 30 '20 at 15:09

0 Answers0