prob_accept: Probability of acceptance for grab sampling scheme

Description Usage Arguments Details Value References Examples

View source: R/prob_accept.R

Description

This function calculates the overall probability of acceptance for given microbiological distribution such as lognormal.

Usage

1
prob_accept(c, r, t, mu, distribution, K, m, sd)

Arguments

c

acceptance number

r

number of primary increments in a grab sample or grab sample size

t

number of grab samples

mu

location parameter (mean log) of the Lognormal and Poisson-lognormal distributions on the log10 scale

distribution

what suitable microbiological distribution we have used such as 'Poisson gamma' or 'Lognormal'or 'Poisson lognormal'

K

dispersion parameter of the Poisson gamma distribution (default value 0.25)

m

microbiological limit with default value zero, generally expressed as number of microorganisms in specific sample weight

sd

standard deviation of the lognormal and Poisson-lognormal distributions on the log10 scale (default value 0.8)

Details

Based on the food safety literature, for given values of c, r and t, the probability of detection in a primary increment is given by, p_d=P(X > m)=1-P_{distribution}(X ≤ m|μ ,σ) and acceptance probability in t selected sample is given by P_a=P_{binomial}(X ≤ c|t,p_d).

If Y be the sum of correlated and identically distributed lognormal random variables X, then the approximate distribution of Y is lognormal distribution with mean μ_y, standard deviation σ_y (see Mehta et al (2006)) where E(Y)=mE(X) and V(Y)=mV(X)+cov(X_i,X_j) for all i \ne j =1 \cdots r.

The parameters μ_y and σ_y of the grab sample unit Y is given by,

μ_y =\log_{10}{(E[Y])} - {{σ_y}^2}/2 \log_e(10)

(see Mussida et al (2013)). For this package development, we have used fixed σ_y value with default value 0.8.

Value

Probability of acceptance

References

Examples

1
2
3
4
5
6
  c <-  0
  r <-  25
  t <-  30
  mu <-  -3
  distribution <- 'Poisson lognormal'
  prob_accept(c, r, t, mu, distribution)

grabsampling documentation built on March 13, 2020, 5:07 p.m.