Description Usage Arguments Details Examples
Given a distance matrix from calcVinEll
, calculate a
stochastic matrix where one step movement probabilities follow an exponential density.
1 | calcExpKernel(distMat, rate)
|
distMat |
Distance matrix from |
rate |
Rate parameter of |
The distribution and density functions for the exponential kernel are given below:
F(x)=1-e^{-λ x}
f(x)=λ e^{-λ x}
where λ is the rate parameter of the exponential distribution.
1 2 3 4 5 6 7 8 9 10 11 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.