Description Usage Arguments Value Note Examples
Estimation of the resulting (i.e., in the actual domain) correlation coefficients, given the equivalent correlation coefficients (i.e., in the Gaussian domain).
1 | NatafGH(rho, fx, fy, paramlistfx, paramlistfy, nodes = 21, prune = 0)
|
rho |
A scalar or vector of correlation coefficients (i.e., in seq(from=0, to=1, by=0.1)). |
fx |
A string indicating the quantile function of the distribution (i.e., the ICDF). |
fy |
A string indicating the quantile function of the distribution (i.e., the ICDF). |
paramlistfx |
A named list with the parameters of the distribution. |
paramlistfy |
A named list with parameters of the distribution. |
nodes |
A scalar indicating the number of nodes for Gauss-Hermite integration (default: nodes=21). |
prune |
A scalar in (0,1) indicating the percentage of pruning for Gauss-Hermite integration (default: nodes=0). |
A vector of correlation coefficients in the actual domain
Avoid the use of this function, when the marginal(s) are discrete. This R function is based on the blog-post of Matthew S. Shotwell (https://biostatmatt.com/archives/2754).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## The case of two identrical Gamma distributions, with shape=1 and scale=1.
## Not run:
fx=fy='qgamma'
pfx=pfy=list(shape=1, scale=1)
rhoz=seq(from=0, to=1 , by=0.05)
rhox=NatafGH(rho = rhoz, fx = fx, fy = fy, paramlistfx = pfx,
paramlistfy = pfy, nodes = 10, prune = 0)
plot(rhoz,rhox); abline(0,1)
## The case of two identrical zero-inflated (i.e., mixed) distributions,
with p0=0.7 a Gamma distribution
## for the continuous part with shape=1 and scale=1.
fx=fy='qzi'
pfx=pfy=list(Distr=qgamma, p0=0.7, shape=0.5, scale=1)
rhoz=seq(from=0, to=1 , by=0.05)
rhox=NatafGH(rho = rhoz, fx = fx, fy = fy, paramlistfx = pfx,
paramlistfy = pfy, nodes = 21, prune = 0)
plot(rhoz,rhox); abline(0,1)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.