Description Usage Arguments Details Value See Also Examples

This function takes mulitple pathogen exposure and calculates the risk of infection over their persistence within host

1 2 | ```
calc_risk_mult(exposure_series, exposure_times, survival_time = Inf,
hazard_risk, clr, na.zero = F, log.surv = F)
``` |

`exposure_series` |
The values of repeated pathogen exposures |

`exposure_times` |
The times of exposures |

`survival_time` |
the final time to calculate survival to (default infinity) |

`hazard_risk` |
The per time risk of exposure during persistence |

`clr` |
The clearance rate of exposure |

The risk for a single exposure is derived in `calc_risk`

. The accumulation of exposure assuming exponential clearance is independent.

*S(t) = exp(-β/c *sum(i = 1..n) p_i *(1 - exp(-c(T - t_i))*

which simplifies as *T -> Inf* to

*S(T) = exp(-β/c *sum(i = 1..n) p_i)*

risk calculation over the time specified in survival time

`calc_risk for single exposures.`

1 2 3 4 5 6 7 8 | ```
##Single exposure examples
calc_risk_mult(1e8, 0, 1, 1e-8, 1) # should return same as calc_risk(1e8, 1, 1e-8, 1)
calc_risk_mult(1e8, 1, 2, 1e-8, 1) # should return same as calc_risk(1e8, 1, 1e-8, 1)
## multiple exposures
exposures = c(1e7, 1e9, 1e5); exp_times = c(0, 1, 2)
calc_risk_mult(exposures, exp_times, 3, hazard_risk = 1e-9, clr = 1)
calc_risk_mult(exposures, exp_times, hazard_risk = 1e-9, clr = 1) #total risk
1-exp(-1e-9/1 * sum(exposures))
``` |

bryanmayer/multdr documentation built on May 13, 2019, 8:11 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.