getNeighbours: Creating Local Neighbourhoods

Description Usage Arguments Value Author(s) See Also Examples

Description

This function calculates a local neighbourhood to be used for fitting of spatial/spatio-temporal vine copulas and for prediction using spatial/spatio-temporal vine copulas.

Usage

1
2
getNeighbours(dataLocs, predLocs, size = 5, var = names(dataLocs)[1], 
              coVar=character(), prediction=FALSE, min.dist = 0.01)

Arguments

dataLocs

some spatial data frame holding the data used for estimation/prediction

predLocs

A spatial object defining the prediction locations, might be missing if the neighbourhood is used for fitting

size

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

var

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

coVar

the name of the covariate, if any

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 neighbourhood.

Author(s)

Benedikt Graeler

See Also

See neighbourhood for the native constructor of a neighbourhood class.

Examples

1
2
3
4
5
library("sp")
spdf <- data.frame(x=c(112,154,212,289,345),y=c(124,198,85,168,346),measure=rlnorm(5))
coordinates(spdf) <- ~x+y

getNeighbours(spdf,size=4)

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