condCovariate: Conditioning of a Covariate

Description Usage Arguments Value Author(s) See Also Examples

Description

Conditions the covariate on the central location in a stCoVarVineCopula.

Usage

1
condCovariate(stNeigh, coVarCop)

Arguments

stNeigh

a spatio-temporal neighbourhood stNeighbourhood with a covariate.

coVarCop

a function taking spatial and temporal indices and returning a copula object describing the dependence between variable of interest and covariate at this location in space and time.

Value

A vector of conditioned data, i.e. covariate|variable of interest

Author(s)

Benedikt Graeler

See Also

stNeighbourhood

Examples

 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))

spcopula documentation built on May 2, 2019, 4:49 p.m.