View source: R/expected_distances_sbm.R
expected_distances_sbm | R Documentation |
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.
expected_distances_sbm(diffusivity,
radius,
deltas)
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. |
This function returns expected geodesic distances (i.e. accounting for spherical geometry) for a diffusion process on a sphere, with isotropic and homogeneous diffusivity.
A non-negative numeric vector of the same length as deltas
, specifying the expected geodesic distance for each time interval in deltas
.
Stilianos Louca
S. Louca (2021). Phylogeographic estimation and simulation of global diffusive dispersal. Systematic Biology. 70:340-359.
fit_sbm_const
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.