sim_single: The generated number of colony-forming units in the mixed...

View source: R/sim_single.R

sim_singleR Documentation

The generated number of colony-forming units in the mixed sample by the simulation results in the single mixing plan with a single stage of the mixing.

Description

This function calculates the resulting generated number of colony forming units in the mixed sample in the single mixing plan with single stage of the mixing.

Usage

sim_single(mu, sigma, alpha, k, distribution, summary, n_sim)

Arguments

mu

the average number of CFUs (\mu) in the mixed sample, which is in a logarithmic scale if we use a Lognormal / Poisson lognormal distribution

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 "Poisson-Type A" or "Poisson-Type B" or "Lognormal-Type A" or "Lognormal-Type B" or "Poisson lognormal-Type A" or "Poisson lognormal-Type B"

summary

if we need to get all simulated N', use summary = 2; otherwise, if we use summary = 1, the function provides the mean value of the simulated N'.

n_sim

number of simulations

Details

Let N' be the number of colony-forming units in the mixed sample which is produced by mixing of k primary samples and N' = \sum N_i. To more details, please refer the details section of compare_mixing_3.

Value

total number of colony forming units in the single mixing plan

References

  • Nauta, M.J., 2005. Microbiological risk assessment models for partitioning and mixing during food handling. International Journal of Food Microbiology 100, 311-322.

See Also

compare_mixing_3

Examples

mu <- 100
sigma <- 0.8
alpha <- 0.1
k <- 30
n_sim <- 20000
sim_single(mu, sigma, alpha, k, distribution = "Poisson lognormal-Type B", summary = 1, n_sim)

Mayooran1987/mixingsimulation documentation built on May 12, 2023, 12:36 a.m.