plotn {msamp}R Documentation

Plots the relation between the probability of detection and the sample size, n

Description

The plotn() function examines the effect of increasing the probability of detection on the sample size, n, where the probability of a single sample unit being contaminated above the target limit is calculated from the msamp function p()

Usage

plotn(
  C,
  w,
  G,
  Sens,
  D = c("homogeneous", "heterogeneous", "localized"),
  r = NULL,
  f = NULL
)

Arguments

C

suspected lot contamination (CFU/g)

w

weight of single sample unit (g)

G

target value to detect (CFU/g)

Sens

sensitivity of the analytical test (%)

D

distribution of the bacteria in the product lot: "homogeneous", "heterogeneous", or "localized"

r

for the heterogeneous case only, the degree of heterogeneity. r > 0

f

for the localized case, r is further specified. 0 < f < 1

Details

Refer to vignette for details.

Value

A plot, of recordedplot class. The probability of detection is on the y-axis and the sample size n is on the x-axis. Overlaid at intersecting red dashed lines is the sample size for probability of detection (prob_det) = 0.9.


[Package msamp version 1.0.0 Index]