calcExpKernel function

Calculate Exponential Stochastic Matrix

Calculate Exponential Stochastic Matrix

Given a distance matrix from calcVinEll, calculate a stochastic matrix where one step movement probabilities follow an exponential density.

calcExpKernel(distMat, rate)

Arguments

  • distMat: Distance matrix from calcVinEll
  • rate: Rate parameter of Exponential distribution

Details

The distribution and density functions for the exponential kernel are given below:

F(x)=1eλx F(x)=1-e^{-\lambda x} f(x)=λeλx f(x)=\lambda e^{-\lambda x}

where λ\lambda is the rate parameter of the exponential distribution.

Examples

# setup distance matrix # two-column matrix with latitude/longitude, in degrees latLong = cbind(runif(n = 5, min = 0, max = 90), runif(n = 5, min = 0, max = 180)) # Vincenty Ellipsoid distance formula distMat = calcVinEll(latLongs = latLong) # calculate exponential distribution over distances # rate is just for example kernMat = calcExpKernel(distMat = distMat, rate = 10)
  • Maintainer: Héctor Manuel Sánchez Castellanos
  • License: GPL-3
  • Last published: 2020-10-05