Description Usage Arguments Value Examples
This function generates a p 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. It is essentially just a wrapper for the Beta_mat_form function, but used to calculate p.
1 | P_mat_form(dist.mat, ps = 1, ds)
|
dist.mat |
An NxN matrix of the pairwise distances between individuals. |
ps |
A descending vector of at least length 2 of the different proportions of maximum infection rate at each level. The first element is assumed to be 1. |
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 proportion of maximum infection rates between individuals.
1 2 | distance_mat <- Dist_mat_unif(N=100, xlim = 20, ylim = 20)[[2]]
P_mat_form(distance_mat, c(1, 0.1), 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.