Description Usage Arguments Details Value Author(s) See Also Examples
A spatio-temporal vine copula is used to predict values at unobserved spatio-temporal locations conditioned on observations of a local spatio-temporal neighbourhood.
1 | stCopPredict(predNeigh, dataST, predST, stVine, margin, method = "quantile", p = 0.5, ...)
|
predNeigh |
the |
dataST |
the same |
predST |
the same |
stVine |
the spatio-temporal vine copula describing the spatio-temporal dependence |
margin |
the marginal distribution as a list with entries named "d" for the density function (PDF), "q" for the quantile function and "p" for cumulative distribution function (CDF). |
method |
one of |
p |
only used for the quantile predictor indicating the desired fraction the quantile should correspond to. |
... |
Further arguments passed to |
Predictions are done based on condStVine
through numerical integration/optimisation.
A ST
object of the same type as provided in the slot locations
of the argument predNeigh
.
Benedikt Graeler
condStVine
and spCopPredict
for the spatial version.
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 | library("sp")
library("spacetime")
spCopT0 <- spCopula(components=list(claytonCopula(8), claytonCopula(4),
claytonCopula(2), claytonCopula(1),
claytonCopula(0.5), indepCopula()),
distances=c(0,100,200,300,400,500),
unit="km")
spCopT1 <- spCopula(components=list(claytonCopula(4), claytonCopula(2),
claytonCopula(1), claytonCopula(0.5),
indepCopula()),
distances=c(0,100,200,300,400),
unit="km")
stCop <- stCopula(components=list(spCopT0, spCopT1),
tlags=-(0:1))
stVineCop <- stVineCopula(stCop, vineCopula(4L))
sp <- SpatialPoints(matrix(c(181000,181100,333500,333600),2))
time <- as.POSIXct("2014-03-18")+60*60*24*c(0,1,2)
data <- data.frame(var1=runif(6))
stData <- STFDF(sp, time, data)
stQuerry <- STF(SpatialPoints(matrix(c(181000,181200,333600,333600),2)),
time[2:3])
stNeigh <- getStNeighbours(stData=stData, ST=stQuerry, prediction=TRUE, spSize=3,
tlags=-(0:1))
stCopPredict(stNeigh, stData, stQuerry, stVineCop, list(q=qunif), "quantile", 0.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.