risktobeinfectedbydistancetoallinfectedunit: Risk to be infected by many neighbours a neighbour at a...

Description Usage Arguments Value Examples

View source: R/Generate_data.R

Description

Risk to be infected by many neighbours a neighbour at a certain distance

Usage

1
2
3
4
5
6
risktobeinfectedbydistancetoallinfectedunit(
  .dist,
  nI,
  .distriskhalf = 5 * 10^(-4),
  jumprisk = 10^-6
)

Arguments

.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

Value

1-(prod(1-risktobeinfectedbydistancetooneinfectedunit(.dist,.distriskhalf))*(1-jumprisk)^nI)

Examples

1
2
#Risk to be ingfected 2 m from the victim when the 50%risk distance is 1 m:
risktobeinfectedbydistancetooneinfectedunit(2,1)

DanielBonnery/Strategy documentation built on Dec. 17, 2021, 4:03 p.m.