individual_probability {covidprobability} | R Documentation |
Calculate a time series of probability for an individual following exposure
Description
The probability that an individual has COVID-19 will change over time as new information is gleaned. The initial probability is the pretest probability (pre0) associated with the nature of the interaction/exposure. This probability will decrease with each passing day that the individual does not develop symptoms. When a test is done, the probability is the posttest probability; this reduces the probability based on the test characteristics at the time of testing. Subsequently, the probability will continue to decrease with each passing day that no symptoms develop. This function returns a time series including those 3 phases.
Usage
individual_probability(test_day, pre0, sens, spec, asympt, days, mu, sigma)
Arguments
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). |
Value
A time series of probabilities