View source: R/infection.count.R
infection.count | R Documentation |
Generates probabilities of developing infection, the relative risk and whether a participant becomes infected or not at exposure times.
infection.count( expos, baseline = 0.03, RR = 3, holding.time = 2, lohi.vit = c(10,70) )
expos |
An object of class |
baseline |
Numeric, baseline prevalence of developing infection at any exposure time. Probability of developing infection when a participant has maximum (fully replete) vitamin D levels. |
RR |
Numeric, the relative risk of the study. The difference between becoming infected at highest and lowest vitamin D levels. |
holding.time |
Numeric, the mean number of weeks for after becoming infected when the participant can not become re-infected. Times are simulated independently from an exponential distribution with this mean. |
lohi.vit |
A vector of length 2 giving the level at which a participant is considered to have insufficient and sufficient vitamin D status levels. |
infection.count
returns an object of class infection.count
that is a list.
The list has the following slots.
baseline |
The baseline prevalence of disease. |
RR |
The relative risk of the study. |
inflection |
The inflection points of the relative risk curve. |
probs |
Matrix, the probability of developing infection at each exposure time for each participant. |
relativerisk |
Matrix, the relative risk of infection at each exposure time for each participant. |
infection |
Matrix, 1 if participant was infected at the corresponding exposure time, 0 if participant was not infected at exposure time. |
count |
Number of infections for each participant over the course of the study. |
mean |
The mean number of infections for the group over the course of the study. |
Rebecca Mangan and Jason Wyse
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.