calc_dist_kernel_shp: Calculates the spatial kernel value (Shapefile)

Description Usage Arguments Value

View source: R/calc_dist_kernel_shp.R

Description

Calculates the spatial kernel values between all areas in a Shapefile 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_shp(dist_mat, dist_c, shp_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.

shp_data

The dataframe object containing the population data extracted from the Shapefile object (generated by the prep_simulation_shp function)

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.


qleclerc/efficientspatial documentation built on May 23, 2019, 1:24 p.m.