Description Usage Arguments Value Examples
View source: R/Beta_mat_form.R
This function generates a beta matrix given a distance function, values of beta, and the distances at which the infection rate changes. It works for a heterogeneous population with a near vs. far spatial kernel.
1 | Beta_mat_form(dist.mat, betas, ds)
|
dist.mat |
An NxN matrix of the pairwise distances between individuals. |
betas |
A descending vector of at least length 2 of the different infection rates at each level. |
ds |
An acsending vector of length length(betas)-1 which contains the distances at which the infection rate changes. |
The function returns an NxN matrix of the pairwise infection rates between individuals.
1 2 | distance_mat <- Dist_mat_unif(N=100, xlim = 20, ylim = 20)[[2]]
Beta_mat_form(distance_mat, c(0.004, 0.002), 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.