Description Usage Arguments Details Examples
Generates multiple time series with given marginals and spatiotemporal properties,
just provide (1) the output of fitVAR
function, and (2) the number of time
steps to simulate.
1 | generateMTS(n, STmodel)
|
n |
number of fields (time steps) to simulate |
STmodel |
list of arguments resulting from |
Referring to the documentation of fitVAR
for details on
computational complexity of the fitting algorithm, here we report indicative
simulation CPU times for some settings, assuming that the model parameters are
already evaluated.
CPU times refer to a Windows 10 Pro x64 laptop with
Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 4-core, 8 logical processors, and 32GB RAM.
CPU time:
d = 900, p = 1, n = 1000: ~17s
d = 900, p = 1, n = 10000: ~75s
d = 900, p = 5, n = 100: ~280s
d = 900, p = 5, n = 1000: ~302s
d = 2500, p = 1, n = 1000 : ~160s
d = 2500, p = 1, n = 10000 : ~570s
where d denotes the number of spatial locations
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Simulation of a 4-dimensional vector with VAR(1) correlation structure
coord <- cbind(runif(4)*30, runif(4)*30)
fit <- fitVAR(
spacepoints = coord,
p = 1,
margdist ='burrXII',
margarg = list(scale = 3,
shape1 = .9,
shape2 = .2),
p0 = 0.8,
stcsid = "clayton",
stcsarg = list(scfid = "weibull",
tcfid = "weibull",
copulaarg = 2,
scfarg = list(scale = 20,
shape = 0.7),
tcfarg = list(scale = 1.1,
shape = 0.8))
)
sim <- generateMTS(n = 100,
STmodel = fit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.