Given a distance matrix from calcVinEll, calculate a stochastic matrix where one step movement probabilities follow a gamma density.
calcGammaKernel(distMat, shape, rate)
Arguments
distMat: Distance matrix from calcVinEll
shape: Shape parameter of GammaDist distribution
rate: Rate parameter of GammaDist distribution
Details
The distribution and density functions for the gamma kernel are given below:
F(x)=Γ(α)1γ(α,βx)f(x)=Γ(α)βαxα−1e−βx
where Γ(α) is the Gamma function, γ(α,βx) is the lower incomplete gamma function, and α,β are the shape and rate parameters, respectively.
Examples
# setup distance matrix# two-column matrix with latitude/longitude, in degreeslatLong = cbind(runif(n =5, min =0, max =90), runif(n =5, min =0, max =180))# Vincenty Ellipsoid distance formuladistMat = calcVinEll(latLongs = latLong)# calculate gamma distribution over distances# shape and rate are just for examplekernMat = calcGammaKernel(distMat = distMat, shape =1, rate =1)