NatafInt: Solve the Nataf integral with an alternative integration...

Description Usage Arguments Value Examples

View source: R/NatafInt.R

Description

Estimation of the resulting (i.e., in the actual domain) correlation coefficients, given the equivalent correlation coefficients (i.e., in the Gaussian domain).

Usage

1
NatafInt(rho, fx, fy, paramlistfx, paramlistfy)

Arguments

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.

Value

A vector of correlation coefficients in the actual domain.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## 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.2)
rhox=NatafInt(rho = rhoz, fx = fx, fy = fy, paramlistfx = pfx, paramlistfy = pfy)
plot(rhoz,rhox); abline(0,1)

## The case identrical Bernoulli distributions, with size=1 and prob=0.3.
fx=fy='qbinom'
pfx=pfy=list(size=1, prob=0.3)
rhoz=seq(from=0, to=1 , by=0.2)
rhox=NatafInt(rho = rhoz, fx = fx, fy = fy, paramlistfx = pfx, paramlistfy = pfy)
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=1, scale=1)
rhoz=seq(from=0, to=1 , by=0.2)
rhox=NatafInt(rho = rhoz, fx = fx, fy = fy, paramlistfx = pfx, paramlistfy = pfy)
plot(rhoz,rhox);abline(0,1)
# compare with the Gauss-Hermite integration method
rhox=NatafGH(rho = rhoz, fx = fx, fy = fy, paramlistfx = pfx, paramlistfy = pfy, nodes = 21)
points(rhoz,rhox,col='red',pch=19)

## End(Not run)

itsoukal/anySim documentation built on May 7, 2020, 11:57 p.m.