TransWikia.com

Generating values from Normal Mixture distributions via copulas

Cross Validated Asked by Ravonrip on November 26, 2021

I have some values with unknown joint distribution, but I am assuming that the marginal distributions are two-part Normal Mixtures.
I am modelling the dependency between the distributions via vine-copulas and pairwise copula constructions.

What I want to do is simulate new values from these distributions, taking into consideration the dependency between them.

What I did:

  • Estimated the parameters of the marginals using R (bayesmix)
  • Used an empirical distribution function to get uniform values from the sample ones, so that I could construct the copula (I could also have used the estimated distributions for the transform)
  • Constructed a vine copula and simulated values from it, meaning I now have uniform values for all variables (VineCopula package)

What I still need to do:

  • Use the generated uniform values that possess the dependency information to get the actual values from the distribution. The problem here comes from the fact that I do not know the inverse CDF of the Normal Mixture and how to do this in R. If it was any of the standard distributions, for which I could calculate the inverse (or the inverse is already implemented), there would be no problem.

So my question is, how can I do this? Is there a way to do this?

I would prefer answers with both theory and R, but will be perfectly satisfied with either.

One Answer

The inverse cdf approach means solving (in $x^i$) an equation of the form $(i=1,2)$ $$omega_1^i Phi({x^i-mu_1^i}/sigma_1^i)+(1-omega_1^i) Phi({x^i-mu_2^i}/sigma_2^i) = u^i$$ Since this equation has no analytical solution, it need be solved by an numerical resolution. For instance, here is a raw R rendering of this resolution

f=function(x){.2*pnorm(.2*(x-1))+.8*pnorm(.7*(x+1))}
uniroot(f=function(x)f(x)-.3},
 interval=c(-1+qnorm(.3)/.7,1+qnorm(.3)/.2))

when $u^i=0.3$, with solution

$root
[1] -1.740754
$f.root
[1] -5.121608e-06

Note that both components do not need to be simulated this way. More precisely, $X^1$ can be generated from the corresponding Normal mixture, then transformed into $U^1$ by the mixture cdf, then $U^2$ can be generated from the copula conditional distribution, and $X^2$ derived by the above numerical inversion.

Answered by Xi'an on November 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP