calcHurdleExpKernel function

Calculate Zero-inflated Exponential Stochastic Matrix

Calculate Zero-inflated Exponential Stochastic Matrix

Given a distance matrix from calcVinEll, calculate a stochastic matrix where one step movement probabilities follow an zero-inflated exponential density with a point mass at zero. The point mass at zero represents the first stage of a two-stage process, where mosquitoes decide to stay at their current node or leave anywhere. This parameter can be calculated from lifetime probabilities to stay at the current node with the helper function calcZeroInflation.

calcHurdleExpKernel(distMat, rate, p0)

Arguments

  • distMat: Distance matrix from calcVinEll
  • rate: Rate parameter of Exponential distribution
  • p0: Point mass at zero

Details

If a mosquito leaves its current node, with probability 1p01-p_{0}, it then chooses a destination node according to a standard exponential density with rate parameter raterate.

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

F(x)=p0θ(x)+(1p0)(1eλx) F(x)=p_{0}\theta(x) + (1-p_{0})(1-e^{-\lambda x}) f(x)=p0δ(x)+(1p0)λeλx f(x)=p_{0}\delta(x)+(1-p_{0})\lambda e^{-\lambda x}

where λ\lambda is the rate parameter of the exponential distribution, θ(x)\theta(x) is the Heaviside step function and δ(x)\delta(x) is the Dirac delta function.

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 hurdle exponential distribution over distances # rate and point mass are just for example kernMat = calcHurdleExpKernel(distMat = distMat, rate = 1/1e6, p0 = 0.1)
  • Maintainer: Héctor Manuel Sánchez Castellanos
  • License: GPL-3
  • Last published: 2020-10-05