NatafMC: Solve the Nataf integral with the Monte-Carlo method

Description Usage Arguments Value Examples

View source: R/NatafMC.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
NatafMC(rho, fx, fy, paramlistfx, paramlistfy, MCsize = 10^5)

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.

MCsize

A scalar determining the number of Monte-Carlo trials (default: 10^-5)

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
## The case of two identical 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)
rhoxMC=NatafMC(rho = rhoz, fx = fx, fy = fy, paramlistfx = pfx, paramlistfy = pfy)
plot(rhoz,rhoxMC, col='blue', pch=19); abline(0,1)
rhoxGH=NatafGH(rho = rhoz, fx = fx, fy = fy, paramlistfx = pfx, paramlistfy = pfy)
points(rhoz, rhoxGH, col='red', pch=5)

## 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)
rhoxMC=NatafMC(rho = rhoz, fx = fx, fy = fy, paramlistfx = pfx, paramlistfy = pfy)
plot(rhoz,rhoxMC, col='blue', pch=19); abline(0,1)

## End(Not run)

## Not run: 
rhoxInt=NatafInt(rho = rhoz, fx = fx, fy = fy, paramlistfx = pfx, paramlistfy = pfy)
points(rhoz, rhoxInt, col='red', pch=5)

## End(Not run)

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