getStNeighbours: Creating Local Spatio-Temporal Neighbourhoods

Description Usage Arguments Value Author(s) See Also Examples

Description

This function calculates local spatio-temporal neighbourhoods to be used for fitting of spatio-temporal vine copulas and for prediction using spatio-temporal vine copulas.

Usage

1
2
getStNeighbours(stData, ST, spSize = 4, tlags=-(0:2), var = names(stData@data)[1], 
                coVar=character(), timeSteps=NA, prediction=FALSE, min.dist = 0.01)

Arguments

stData

some spatio-temporal data frame holding the data used for estimation/prediction

ST

A spatio-temporal object defining the prediction locations, might be missing if the spatio-temporal neighbourhood is used for fitting.

spSize

The spatial size of the neighbourhood including the location of interest (for fitting as well for prediction).

tlags

The temporal lags to be used in the spatio-temporal neighbourhood.

var

the variable name of interest, by default the first variable is used

coVar

the covariate's name

timeSteps

The number of time instances that should randomly be selected from stData. The default, NA, selects all locations.

prediction

whether the neighbourhood should be used for prediction (TRUE) or spatial/Spatio-temporal vine copula fitting.

min.dist

the minimal distance for a location to be included. Must be larger than 0 for fitting purposes and might be 0 for prediction.

Value

An object of stNeighbourhood.

Author(s)

Benedikt Graeler

See Also

See stNeighbourhood for the native constructor of a stNeighbourhood class. The pure spatial version can be found at getNeighbours.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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(measure=runif(6))

stData <- STFDF(sp, time, data)
stQuerry <- STF(SpatialPoints(matrix(c(181000,181200,333600,333600),2)),
                time[2:3])

getStNeighbours(stData=stData, ST=stQuerry, var="measure", spSize=3, 
                tlags=-(0:1), prediction=TRUE)

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