Description Usage Arguments Value Examples
View source: R/Generate_data.R
Risk to be infected by many neighbours a neighbour at a certain distance
1 2 3 4 5 6 | risktobeinfectedbydistancetoallinfectedunit(
.dist,
nI,
.distriskhalf = 5 * 10^(-4),
jumprisk = 10^-6
)
|
.dist |
: a vector (distances) |
.disthalfrisk |
: distance for which the risk is one half |
nI: |
total number of infected |
jumprisk: |
probability to be infected by one person, no matter how far he(she) is |
1-(prod(1-risktobeinfectedbydistancetooneinfectedunit(.dist,.distriskhalf))*(1-jumprisk)^nI)
1 2 | #Risk to be ingfected 2 m from the victim when the 50%risk distance is 1 m:
risktobeinfectedbydistancetooneinfectedunit(2,1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.