Skip to content

Support right-censored / top-coded counts (e.g. 1, 2, 3+) in zero-truncated models #74

Description

@BERENZ

Extend the zero-truncated families to handle right-censored (top-coded) counts, where the count y is observed only in grouped form such as 1, 2, 3+ (the top category lumps all y ≥ c) rather than the full 1, 2, 3, 4, … .

This is the concrete, count-specific version of the "right-censored models" line in #10.

Motivation

Capture–recapture / unseen-species data are frequently reported in top-coded form — e.g. "identified once, twice, or three-or-more times". The Chao-type estimators (chao, oichao) use only the low counts (f₁,f₂ or f₂,f₃) and are therefore already robust to top-coding, but the full-likelihood parametric families (ztpoisson, ztgeom, ztnegbin, the OI/ZT and Hurdle variants, …) currently assume every count is observed exactly and cannot be fit to top-coded data.

What's needed

  • Allow the response to encode a censoring threshold c, so the data are (f₁, …, f_{c−1}, f_{c+}) with f_{c+} = #{units with y ≥ c}.
  • In the (zero-truncated) likelihood, use the exact pmf p₊(y) for the fully-observed cells y < c and the tail / survival probability P(Y ≥ c | Y ≥ 1) = 1 − Σ_{y=1}^{c−1} p₊(y) for the censored top cell. (The families already carry the pmf and a CDF — used internally in their simulate methods — so the survival term is readily available.)
  • Propagate to deviance / residuals and confirm the Horvitz–Thompson / popSizeEst() machinery works once parameters are estimated from censored data.

Scope / notes

  • Primarily benefits the parametric ZT families; chao/oichao are unaffected (they ignore high counts by construction).
  • Related but distinct from the binomial-with-known-T base (Add Binomial-with-known-T base for OIZT/ZTOI (Boehning & Friedl 2024, Sec. 5) #64), which is bounded support (y ≤ T); this is censoring of an otherwise-unbounded count.
  • Likely a controlModel / response-encoding option plus a family survival/tail hook, rather than new families.

Acceptance

  • Fit a ZT family to top-coded data (e.g. {1, 2, 3+}) and recover sensible parameter + population-size estimates; unit tests on a synthetic top-coded sample; documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RoadmapDescirbes features that ought to be implemented in newer versions of the packageenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions