Description Usage Arguments Value Note Examples
Estimation of parameters of the auxiliary SMA model to simulate the auxiliary Gaussian process.
1 2 3 4 5 6 7 8 9 10 11 12 |
dist |
A k-dimensional string vector indicating the quantile function of the target marginal distribution (i.e., the ICDF). |
params |
A k-dimensional named list with the parameters of the target distributions. |
ACFs |
A k-dimensional list with the target autocorrelation structure (including lag-0, i.e., 1). |
Cmat |
A matrix (k x k) containing the lag-0 cross-correlation coefficients of the processes. |
DecoMethod |
A string indicating the decomposition method, in case of a non-positive definite matrix (options: 'cor.smooth' and 'nearPD') |
FFTLag |
A scalar indicating the length of the Fast Fourrier Transform (required to estimate the internal parameters of SMA model). Default value=512. |
NatafIntMethod |
A string ("GH", "Int", or "MC"), indicating the intergation method, to resolve the Nataf integral. |
NoEval |
A scalar (power of 2) indicating (default: 9) the number of evaluation points for the integration methods. |
polydeg |
A scalar indicating the order of the fitted polynomial. If polydeg=0, then another curve is fitted. |
... |
Additional named arguments for the selected "NatafIntMethod" method. |
A list with the parameters of the auxiliary Gaussian SMA model.
Avoid the use of the "GH" method (i.e., NatafIntMethod='GH'), when the marginal(s) are discrete.
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 30 31 32 33 34 35 36 37 38 39 40 41 | ## Multivariate simulation of 3 stationary processes with specific distribution functions
## and autocorrelation structures, as well as specific lag-0 cross-correlation matrix.
## Not run:
set.seed(9)
# Define the target autocorrelation structure of the 3 processes.
ACSs=list()
ACSs[[1]]=csCAS(param=c(0.1,0.7),lag=2^6)
ACSs[[2]]=csCAS(param=c(0.2,1),lag=2^6)
ACSs[[3]]=csCAS(param=c(0.1,0.5),lag=2^6)
# Define the matrix of lag-0 cross-correlation coefficients between the 3 processes.
Cmat=matrix(c(1,0.4,-0.5,
0.4,1,-0.3,
-0.5,-0.3,1),ncol=3,nrow=3)
# Define the target distribution functions (ICDF) of the 3 processes
FXs=rep('qmixed',3) # Define that distributions are of zero-inflated type.
# Define the distributions for the continuous part of the processes.
# In this example, a re-parameterized version of Gen. Gamma distribution is used for the second process.
qgengamma=function(p,scale, shape1, shape2){
require(VGAM)
X=qgengamma.stacy(p=p,scale=scale,k=(shape1/shape2),d=shape2)
return(X)
}
# Define the parameters of the target distributions.
pFXs[[1]]=list(Distr=qbeta,p0=0,shape1=15,shape2=5) # Beta distribution
pFXs[[2]]=list(Distr=qgengamma,p0=0.7,scale=0.12, shape1=1.35, shape2=0.4) # Gen. Gamma
pFXs[[3]]=list(Distr=qnorm,p0=0,mean=15,sd=3) # Normal distribution
# Estimate the parameters of SMARTA model
SMAparam=EstSMARTA(dist=FXs,params=pFXs,ACFs=ACSs,Cmat=Cmat,
DecoMethod='cor.smooth',FFTLag = 2^7,
NatafIntMethod='GH',NoEval=9,polydeg=8)
# Generate the synthetic series
simSMARTA=SimSMARTA(SMARTApar=SMAparam,steps=2^14,SMALAG=2^6)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.