View source: R/sim_single_pd.R
| sim_single_pd | R Documentation |
This function gives a probability of detection at a single stage (or revolution) of the mixing process.
sim_single_pd(mu, sigma, alpha, k, distribution, UDL, n_sim)
mu |
the average number of CFUs ( |
sigma |
the standard deviation of the colony-forming units in the mixed sample on the logarithmic scale (default value 0.8) |
alpha |
concentration parameter |
k |
number of small portions / primary samples |
distribution |
what suitable distribution type we have employed for simulation such as |
UDL |
the upper decision limit, which depends on the type of microorganisms and testing regulations. |
n_sim |
number of simulations |
Let N' be the number of CFUs in the mixed sample, which is produced by the contribution of k primary samples mixing, N' = \sum N_i and let l be the number of stages in the mixing process.
This function provides the probability of detection at each stage of the mixing process. The probability of detection can be determined by how many primary samples contain CFUs greater than UDL out of the number of primary samples engaged at each mixing stage.
Therefore, the probability of detection (p_d) can be estimated from following formula,
p_d = \frac{\textnormal{Number of primary samples which contain CFUs greater than UDL}}{\textnormal{Number of primary samples}} ;
where the upper decision limit (UDL) depends on microorganisms and testing regulations. For example, UDL should be equal to 0 for testing Salmonella in milk powder sample if we consider 25g primary sample.
The probability of detection at each stage of the mixing process.
Nauta, M.J., 2005. Microbiological risk assessment models for partitioning and mixing during food handling. International Journal of Food Microbiology 100, 311-322.
sim_single_stages
mu <- 100
sigma <- 0.8
alpha <- 0.1
k <- 30
distribution <- "Poisson lognormal-Type B"
UDL <- 0
n_sim <- 2000
sim_single_pd(mu, sigma , alpha , k, distribution, UDL, n_sim)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.