`R/functions.R`

`unit_probability.Rd`

To calculate the probability that any asymptomatic person has COVID-19,
this function treats each person/exposure as independent events and
calculates the probability time series using the individuals time series from
`individual_probability()`

.

unit_probability(test_day, pre0, sens, spec, asympt, days, mu, sigma, n)

test_day | Day of PCR test (days since exposure) |
---|---|

pre0 | Pre-test probability of person on day of exposure |

sens | A vector of sensitivities by day since exposure |

spec | The specificity of the PCR test |

asympt | The proportion of infected patients expected to remain asymptomatic throughout the course of infection |

days | Days since exposure for calculation range |

mu | The mean of a lognormal distribution that approximates the incubation period for COVID-19. E.g. 1.63 (see reference). |

sigma | The standard deviation of a lognormal distribution that approximates the incubation period for COVID-19. E.g. 0.5 (see reference). |

n | Number of exposed individuals |

The probability of an event with the specified probability, after n repetitions