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:
What I still need to do:
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.
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
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP