Generation of contaminated lots with variability in prevalence and concentration
Source:R/Lot2LotGen.R
Lot2LotGen.Rd
The function Lot2LotGen()
generates a matrix of contaminated lots from information on
the parameters of a beta distribution (alpha
, beta
) representing the between-lot variability in prevalence;
the parameters of a normal distribution (mean
, sd
) representing the total variability in the microbial concentration
in the contaminated units (log10 CFU/g
); and the proportion of such total variance assigned to between-lot variance.
Every row of the matrix corresponds to a production lot, broken down in units or portions, which are the columns of the matrix.
Usage
Lot2LotGen(
nLots,
sizeLot,
unitSize,
betaAlpha,
betaBeta,
C0MeanLog,
C0SdLog,
propVarInter,
Poisson = FALSE,
...
)
Arguments
- nLots
Number of lots sampled or size of the Monte Carlo simulation (scalar).
- sizeLot
Number of units or portions produced in a lot (scalar).
- unitSize
Weight (
g
) of single unit or portion from a lot (scalar).- betaAlpha
Parameter
alpha
of the beta distribution representing the between-batch variability in prevalence (scalar).- betaBeta
Parameter
beta
of the beta distribution representing the between-batch variability in prevalence (scalar).- C0MeanLog
Mean parameter (
log10 CFU/g
) of the normal distribution representing the total variability in the microbial concentration of contaminated units (scalar or vector).- C0SdLog
Standard deviation parameter (
log10 CFU/g
) of the normal distribution representing the total variability in the microbial concentration of contaminated units (scalar or vector).- propVarInter
proportion of the total variance (\(C0\_sdLog10^2\)) attributed to between-lot variance. The remaining (
1-propVarInter
) is the proportion of within-lot variance.- Poisson
need to be defined
- ...
Other options used to control
LotGen()
Value
A list of four elements:
N
(
CFU
) A matrix of sizenLots
lots bysizeLot
units representing the microbial numbers in the units or portions from contaminated lots;ProbUnitPos
Probability that the lot is contaminated (a lot is considered contaminated if at least one unit or portion is contaminated) (vector);
P
Mean prevalence of contaminated lots (scalar);
betaGen
True prevalence of contaminated units in the lots (sampled from the beta distribution) (vector).
Note
This function requires that the variability in the prevalence of L. monocytogenes between lots is
represented by a beta distribution.
To determine the parameters of such a beta distribution, a beta-binomial distribution was fitted to survey data
(compiled in Table 3.21 of WHO (2022)
, consisting of positive samples and total sample size.
The beta-binomial was fitted through a Markov-Chain Monte Carlo approach, with gamma(0.01, 0.01)
as priors for both parameters,
and assuming that every data source (a published paper) represents a different lot. The parameters of the beta distribution
were determined at: betaAlpha=0.5112
and betaBeta=9.959
.
The mean (C0MeanLog=1.023
log10 CFU/g) and standard deviation (C0SdLog=0.3267
log10\ CFU/g) of the normal distribution
representing the overall variability in L. monocytogenes were obtained using data from Jeyaletchumi (2011)
(3.0 MPN/g, 3.6 MPN/g in freshly harvested vegetables), Magdovitz et al. (2021)
(21, 36 and 75 MPN/g in corn and peas
arriving at the frozen food facility), and Kuan et al. (2017)
(3.0 MPN/g in bulk carrots at retail).
The algorithm decomposes at the log10 level the total variance in concentration into between-lot variance and within-lot
variance according to the proportion propVarInter
.
References
Team RC (2022). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/. WHO (2022). “A Roadmap for the Development of Risk Assessment Models of Listeria monocytogenes in Selected Produce and Seafood Products.” World Health Organization. Jeyaletchumi PTRSPMCLCRSFMGCYKMNYNKMP (2011). “Evaluation of Listeria spp. and Listeria monocytogenes in selected vegetable farms.” Journal of Tropical Agriculture and Food Science, 39(2), 255-266. Magdovitz BF, Gummalla S, Garren D, Thippareddi H, Berrang ME, Harrison MA (2021). “Prevalence of Listeria species and Listeria monocytogenes on raw produce arriving at frozen food manufacturing facilities.” Journal of Food Protection, 84(11), 1898-1903. Kuan CH, Rukayadi Y, Ahmad SH, Wan C, Radzi M, Thung TY, Premarathne J, Chang WS, Loo YY, Tan CW, Ramzi OB, Fadzil SNM, Kuan CS, Yeo SK, Nishibuchi M, Radu S (2017). “Comparison of the microbiological quality and safety between conventional and organic vegetables sold in Malaysia.” Frontiers in Microbiology, 8, 1433.
See also
Other data generation:
LotGen()
,
caPrimaryProduction()
Author
Vasco Cadavez vcadavez@ipb.pt and Regis Pouillot rpouillot.work@gmail.com