gravityWithDistance | R Documentation |
In order to obtain more accurate results, following Viboud et al. 2006 we implement a nine-parameter form of the gravity law, in which short and long trips are fitted separately. Similarly to the gravity model we fit each parameter (equation 1) using a Poisson regression:
T_{ij} = \theta \frac{ N_i^{\alpha} N_j^{\beta} }{d_{ij}^{\gamma}}
where \theta
is a proportionality constant and the exponents \alpha
and \beta
respectively,
tune the dependence of dispersal on donor and recipient population sizes (N
), and the distance between
the two communities d_{ij}^{\gamma}
. By taking the logarithm of on both sides this becomes:
\ln(T_{ij}) = \ln(\theta) + \alpha \ln(N_i) + \beta \ln{N_j} - \gamma \ln(d_{ij})
Viboud et al. show that below 119km, the population exponents are relatively high and larger for the destination population. Therefore we allow the flexibility to adjust based on a distance cutoff for the model.
gravityWithDistance(theta1 = 0.01, alpha1 = 0.06, beta1 = 0.03,
gamma1 = 0.01, delta = 0.5, theta2 = 0.01, alpha2 = 0.06,
beta2 = 0.03, gamma2 = 0.01)
theta1 |
Model parameter with default value and the limits theta = [0, Inf]. |
alpha1 |
Model parameter with default value and the limits alpha = [-Inf, Inf]. |
beta1 |
Model parameter with default value and the limits beta = [-Inf, Inf]. |
gamma1 |
Model parameter with default value and the limits gamma = [-Inf, Inf]. |
delta |
Model parameter with default value and the limits delta = [0, 1]. |
theta2 |
Model parameter with default value and the limits theta = [0, Inf]. |
alpha2 |
Model parameter with default value and the limits alpha = [-Inf, Inf]. |
beta2 |
Model parameter with default value and the limits beta = [-Inf, Inf]. |
gamma2 |
Model parameter with default value and the limits gamma = [-Inf, Inf]. |
A flux model object with the gravity with distance flux
function and a set of starting
parameters.
Limits 0
and Inf
will be changed internally to the numerically safe approximations
0 -> sqrt(.Machine$double.eps)
and Inf -> sqrt(.Machine$double.xmax)
, respectively.
Viboud, C. et al. (2006). Synchrony, waves, and spatial hierarchies in the spread of influenza. Science, 312, 447-51
movement
, originalRadiation
, radiationWithSelection
,
uniformSelection
, interveningOpportunities
, gravity
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.