[ANN] LimitOfDetection.jl - Easily estimate limit of detection

A modest package that does a single thing (hopefully well) : estimate a limit of detection from data. The limit of detection (LoD) is the lowest value of a variable, e.g. x at which an event can be detected with a given sensitivity. For example, a smoke detector that triggers at a concentration of 15,000 particles per cm^3 with 95% probability has a 95%-LoD of 15,000.

The model use standard probit/logit regression but I added sampling to estimate confidence intervals on the LoD. Also comes with a plot recipee.

Example

using LimitOfDetection

# generate artificial data   
x = LinRange(0,1,100)
link = ProbitLink()
f = x -> LimitOfDetection.GLM.linkinv(link, 10*x - 5)
Pcall = f.(x) 
detected = [rand() < P for P in Pcall]

# fit model
model = fit(LoDModel, x, detected; Nsamples = 50_000, sensitivity = 0.95, link = ProbitLink())
    
julia> model
Limit of Detection:
────────────────────────────────────────────────────────────
              MLE      Mean        Std  Lower 90%  Upper 90%
────────────────────────────────────────────────────────────
95%-LoD  0.670671  0.670189  0.0134975   0.648664   0.693332
────────────────────────────────────────────────────────────

julia> using Plots; plot(model)
5 Likes