calc_dist_kernel: Calculates the spatial kernel values

Description Usage Arguments Value Examples

Description

Calculates the spatial kernel values between all areas in a spatial dataset using their distance and population. This uses a gravity kernel structure (either matched or smooth depending on the threshold distance).

Usage

1
2
calc_dist_kernel(dist_mat, dist_c, spatial_data, alpha, p, p2, aa,
  delta = 0.3)

Arguments

dist_mat

The distance matrix between all areas.

dist_c

The threshold distance for the matched kernel. Note that setting this to an extremely high value will effectively make the gravity kernel a smooth kernel with a single function since the threshold distance will never be crossed.

spatial_data

The spatial dataset containing the population data

alpha

The destination population power.

p

The distance power.

p2

The secondary distance power for the matched kernel.

aa

The offset distance.

delta

The home cell modifier (to compensate the distance within cells equal to 0).

Value

Returns one matrix object containing the spatial kernel values.

Examples

1
2
3
4
5
6
7
8
#Create a spatial dataset:
test_data = raster(nrow=10, ncol=10, xmn=1, xmx=100000, ymn=1, ymx=100000)
values(test_data) = runif(100, 1, 1000)

#Calculate distance matrix
dist_mat = calc_dist_mat(test_data)

dist_kernel = calc_dist_kernel(dist_mat, dist_c = 87, test_data, alpha=0.95, p=6.6, p2=1.53, aa=35)

qleclerc/epicspatial documentation built on May 21, 2019, 4:06 a.m.