Description Usage Arguments Value Author(s) See Also Examples
View source: R/stCoVarVineCopula.R
Conditions the covariate on the central location in a stCoVarVineCopula
.
1 | condCovariate(stNeigh, coVarCop)
|
stNeigh |
a spatio-temporal neighbourhood |
coVarCop |
a function taking spatial and temporal indices and returning a |
A vector of conditioned data, i.e. covariate|variable of interest
Benedikt Graeler
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library("sp")
library("spacetime")
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(var=runif(6))
data$coVar <- invdduCopula(data$var, gumbelCopula(7), 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,
spSize=3, tlags=-(0:1),
var="var", coVar="coVar", prediction=TRUE)
condCovariate(stNeigh, function(x) gumbelCopula(7))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.