Description Usage Arguments References Examples
Provides a parametric function that describes the values of the linear spatiotemporal autocorrelation up to desired lags. For more details on the parametric spatiotemporal correlation structures see section 2.3 and 2.4 in Papalexiou and Serinaldi (2020).
1 |
id |
spatiotemporal correlation structure ID |
... |
additional arguments (t as time lag, s as spatial lag (distance), and stcs parameters) |
Papalexiou, S.M., Serinaldi, F. (2020). Random Fields Simplified: Preserving Marginal Distributions, Correlations, and Intermittency, With Applications From Rainfall to Humidity. Water Resources Research, 56(2), e2019WR026331, doi: 10.1029/2019WR026331
Papalexiou, S.M., Serinaldi, F., Porcu, E. (2021). Advancing Space-Time Simulation of Random Fields: From Storms to Cyclones and Beyond. Water Resources Research, 57, e2020WR029466, doi: 10.1029/2020WR029466
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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | library(plot3D)
## specify grid of spatial and temporal lags
d <- 31
st <- expand.grid(0:(d-1),
0:(d-1))
## get the STCS
wc <- stcs("clayton",
t = st[, 1],
s = st[, 2],
scfid = 'weibull',
tcfid = 'weibull',
copulaarg = 2,
scfarg = list(scale = 20,
shape = 0.7),
tcfarg = list(scale = 1.1,
shape = 0.8))
g14 <- stcs("gneiting14",
t = st[, 1],
s = st[, 2],
a = 1/50,
c = 1/10,
alpha = 1,
beta = 1,
gamma = 0.5,
tau = 1)
g16 <- stcs("gneiting16",
t = st[, 1],
s = st[, 2],
a = 1/50,
c = 1/10,
alpha = 1,
beta = 1,
nu = 0.5,
tau = 1)
## note: for nu = 0.5 stcfgneiting16 is equivalent to
## stcfgneiting14 with gamma = 0.5
## visualize the STCS
wc.m <- matrix(wc,
nrow = d)
persp3D(z = wc.m, x = 1: nrow(wc.m), y = 1:ncol(wc.m),
expand = 1, main = "", scale = TRUE, facets = TRUE,
xlab="Time lag", ylab = "Distance", zlab = "STCF",
colkey = list(side = 4, length = 0.5), phi = 20, theta = 120,
resfac = 5, col= gg2.col(100))
g14.m <- matrix(g14,
nrow = d)
persp3D(z = g14.m, x = 1: nrow(wc.m), y = 1:ncol(wc.m),
expand = 1, main = "", scale = TRUE, facets = TRUE,
xlab="Time lag", ylab = "Distance", zlab = "STCF",
colkey = list(side = 4, length = 0.5), phi = 20, theta = 120,
resfac = 5, col= gg2.col(100))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.