expected_distances_sbm: Expected distances traversed by a Spherical Brownian Motion.

View source: R/expected_distances_sbm.R

expected_distances_sbmR 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 and time intervals (deltas); for example, if radius is in km and deltas are in years, then diffusivity must be specified in km^2/year.

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

fit_sbm_const

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))

castor documentation built on Aug. 18, 2023, 1:07 a.m.