reduceNeighbours: Selecting the strongest correlated neighbours

Description Usage Arguments Value Author(s) See Also Examples

Description

A function selecting the strongest correlated neighbours from a larger set of neighbours

Usage

1
2
reduceNeighbours(stNeigh, stDepFun, n,
                 prediction=stNeigh@prediction, dropEmpty=!prediction)

Arguments

stNeigh

the proxy neighbourhood to be investigated

stDepFun

a spatio-temporal dependence function that return correlation estimates based on a spatial and temporal distance

n

the number of neighbours to be selected.

prediction

whether the neighbourhood is used for prediction (the data slot does not provide the central location's data)

dropEmpty

whether empty neighbourhoods (i.e. neighbourhoods with NA's at the central location) shall be dropped.

Value

A spatio-temporal neighbourhood stNeighbourhood with fewer neighbours.

Author(s)

Benedikt Graeler

See Also

getStNeighbours

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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,3,4)
data <- data.frame(var1=runif(10))

stData <- STFDF(sp, time, data)

stNeigh <- getStNeighbours(stData, spSize=2, tlags=-(0:2))

reduceNeighbours(stNeigh, function(h,delta) return(1/h/delta), 2)

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