Hurdle and zero-inflated negative binomial models for sequencing count data.
|
Important
|
Status: not implemented. This repository holds the specification the models will be built against, and nothing else yet. The package loads, but it exports no functions. |
Amplicon count tables contain many zeros. A hurdle or zero-inflated model gives those zeros their own sub-model. This package will provide two such models for one taxon at a time:
-
hurdle_nb: a binomial model for whether any reads were seen, and a zero-truncated negative binomial for how many, given that some were; -
zinb: a negative binomial mixed with a point mass at zero.
They are intended as alternative fits shown beside a plain negative binomial GLM, so that a user can see whether a conclusion depends on how zeros are modelled. They are not a replacement for it, and no model is chosen automatically.
The first consumer is MetaManifold-WebUI, where these methods were proposed in issue #18. That repository will receive only a thin adapter (a route, a panel, configuration keys, and a dependency pinned by commit). The models, tests and proofs live here.
docs/method-conditions/zero-inflation-and-hurdle.adoc sets out, before any code exists:
-
the model formulas, and how sequencing depth enters each part;
-
the data accepted, and the minimum sizes below which a fit is refused;
-
the single per-taxon test and the multiple-testing rule;
-
why the Vuong test is not offered, and what replaces it;
-
every unsuccessful state and how it is reported;
-
the evidence required before the methods count as implemented;
-
what is explicitly not claimed.
-
Production fits call R’s
psclpackage through RCall. -
A pure-Julia log-likelihood for each model exists only in the test suite, as an independent oracle to check the R results against.
-
Agda proofs (
--safe --without-K) of three model identities: the hurdle likelihood separates into its two parts; the truncation normaliser is positive; the ZINB zero probability lies in [0, 1]. Whether an estimator recovers the truth is a tested claim, never a proved one.
Occupancy models, also proposed in issue #18, are out of scope here. With one sample per unit they are not identifiable without an untestable assumption.
julia --project=. -e 'using Pkg; Pkg.test()'At present this runs Aqua.test_all (11 checks) and one placeholder
behaviour test. No model is tested yet, because none exists.
Code, configuration and scripts are Mozilla Public License 2.0
(MPL-2.0); prose documentation is CC-BY-SA-4.0. Both texts live in
LICENSES/, and per-file SPDX-License-Identifier headers are authoritative.