Description Usage Arguments Examples
Returns a dataset containing multiple time series in the form of a matrix where the sites are in columns. Different record lengths can be specified for each site and missing values are filled accordingly at the beginning. The rows (time) are independent and the intersite correlation model is based on a multivariate Normal distribution.
1 2 3 4 5 6 7 8 9 10 11 |
x, obj |
Matrix (in rows) of parameters or L-moments for all sites to simulate. Can also be a pooling group or intersite model, where key arguments are extracted from the input object. |
distr |
Marginal distribution of each site. If only one value is passed as argument, the same is used for all sites. |
nrec |
Record lengths of the sites. If only one value is passed in argument, the same is used for all sites. |
corr |
Correlation matrix for the dependence between site. If only one value is passed, the correlation is assumed the for every pair of sites. |
corr.sqrt |
Squared correlation matrix. Can be passed to speed up multiple calls. |
lmom |
Logical. Is the argument 'x' a matrix of L-moments or distribution parameters |
lscale |
Logical. Is the second L-moments the scale ('TRUE') or the LCV ('FALSE'). |
long |
Logical. Should the output be returned in a long format. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Extract data
data(canFlood)
lmom <- canFlood[1:5, c('L1','LCV','LSK')]
## Simulate data base on at-site L-moments
sim <- RegSim(lmom, distr = 'gev', nrec = 11:15, corr = .4)
head(sim)
sim <- RegSim(lmom,
distr = c(rep('gev',4),'gno'),
nrec = 10:15,
corr = .4, long = TRUE)
head(sim)
############################################################################
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.