| expected_distances_sbm {castor} | R Documentation |
Expected distances traversed by a Spherical Brownian Motion.
Description
Given a Spherical Brownian Motion (SBM) process with constant diffusivity, compute the expected geodesic distance traversed over specific time intervals. This quantity may be used as a measure for how fast a lineage disperses across the globe over time.
Usage
expected_distances_sbm(diffusivity,
radius,
deltas)
Arguments
diffusivity |
Numeric, the diffusivity (aka. diffusion coefficient) of the SBM. The units of the diffusivity must be consistent with the units used for specifying the |
radius |
Positive numeric, the radius of the sphere. |
deltas |
Numeric vector, listing time intervals for which to compute the expected geodesic distances. |
Details
This function returns expected geodesic distances (i.e. accounting for spherical geometry) for a diffusion process on a sphere, with isotropic and homogeneous diffusivity.
Value
A non-negative numeric vector of the same length as deltas, specifying the expected geodesic distance for each time interval in deltas.
Author(s)
Stilianos Louca
References
S. Louca (2021). Phylogeographic estimation and simulation of global diffusive dispersal. Systematic Biology. 70:340-359.
See Also
Examples
# compute the expected geodistance (in km) after 100 and 1000 years
# assuming a diffusivity of 20 km^2/year
expected_distances = expected_distances_sbm(diffusivity = 20,
radius = 6371,
deltas = c(100,1000))