Description Usage Arguments Value Author(s) See Also
This function simulates a connectivity matrix supplied model parameters in a gravitym odel formula that incorporates trip duration by using a conditional dispersal kernel (f(d_ij | λ_ij)) in
the denominator. The gravity model still uses a Gamma distribution as the dispersal kernel, but this is scaled by the probability Pr(λ_ij | d_ij) according to Bayes theorem. If a
vector of shape (s) and rate (r) parameters is supplied, the function will simulate route specific dispersal kernels based on the origin location (i). A null model (where all model parameters = 1)
can be simulated by supplying only population sizes (N) and pairwise distances (D).
θ * ( N_i^ω_1 N_j^ω_2 / f(d_ij | λ_ij) )
1 2 3 4 5 6 7 8 9 10 11 | sim.gravity.duration(
N,
D,
theta = 1,
omega.1 = 1,
omega.2 = 1,
gamma = 1,
lambda,
alpha = 1,
counts = FALSE
)
|
N |
vector of population sizes |
D |
matrix of distances among all ij pairs |
theta |
scalar giving the proportionality constant of gravity formula (default = 1) |
omega.1 |
scalar giving exponential scaling of origin population size (default = 1) |
omega.2 |
scalar giving exponential scaling of destination population size (default = 1) |
gamma |
scalar giving the dispersal kernel paramater (default = 1) |
lambda |
matrix of trip duration decay parameters for each ij route |
alpha |
model fitting parameter for the ECDF of lambda (default = 1) |
counts |
logical indicating whether or not to return a count variable by scaling the connectivity matrix by origin population size (N_i) (default = FALSE) |
a matrix with values between 0 and 1 (if counts = FALSE) or positive integers (if counts = TRUE)
John Giles
Other simulation:
calc.hpd(),
calc.prop.inf(),
calc.prop.remain(),
calc.timing.magnitude(),
calc.wait.time(),
decay.func(),
get.age.beta(),
get.beta.params(),
sim.TSIR.full(),
sim.TSIR(),
sim.combine.dual(),
sim.combine(),
sim.gravity(),
sim.lambda(),
sim.pi(),
sim.rho(),
sim.tau()
Other gravity:
fit.gravity(),
fit.prob.travel(),
sim.gravity()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.