Description Usage Arguments Details See Also Examples
Returns a matrix of the simulation of at-site data based on the choice of a marginal distribution and a copula model.
1 2 3 |
n |
Number of simulation. |
distr |
The marginal distribution. See vec2par. |
marg |
The parameter of the marginal distribution. Either a vector or a matrix with parameters in rows. |
cop |
A string representing the copula familly. Possible choice: Normal ('norm'), t-copula ('t'), Chi-square ('chisq'), squared t-copula ('tsq'), reverse chi-square ('rchisq') and reverse squared t-copula ('rtsq'). |
h |
A matrix of distances. If |
type |
A string representing a correlation model.
See |
p |
The parameters of the correlation model . |
sigma, demi |
Covariance matrix or its square root. |
nu |
Degree of freedom of a t-copula (if necessary). |
unpivot |
If |
The Chi-squared and the squared t-copula are the copulas of the squared variables coming from a multivariate Normal and Student distribution respectively. The "squared" copulas introduce radial asymmetry and their reverse have asymmetry in the opposite direction.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | xx <- simAtSite(100, distr = 'gev', marg = c(100, 10, .1),
cop = 'ind', h = 10, unpivot = TRUE)
coord <- replicate(2,runif(200,0,500))
h <- as.matrix(dist(coord))
# normal copula
xx <- simAtSite(1000, marg = c(100,20,-.1), h = h, p = c(400,0))
hist(xx[,2])
# t-copula
demi <- chol(corModel(c(400,0),h))
xx <- simAtSite(100, distr = 'unif',
cop = 't', demi = demi, nu = 5)
hist(xx)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.