# Handling negative delays between reference and report

**URL:** <https://community.epinowcast.org/t/handling-negative-delays-between-reference-and-report/37>\
**Category:** Developers\
**Tags:** model-extension\
**Created:** [23 August 2022 15:44 UTC](https://community.epinowcast.org/t/handling-negative-delays-between-reference-and-report/37 "2022-08-23T15:44:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrianlison](https://dub1.discourse-cdn.com/flex005/user_avatar/community.epinowcast.org/adrianlison/32/27_2.png) [@adrianlison](https://community.epinowcast.org/u/adrianlison)\
**Post date:** [23 August 2022 15:44 UTC](https://community.epinowcast.org/t/handling-negative-delays-between-reference-and-report/37/1 "2022-08-23T15:44:52Z")

</div>

Porting the discussion started [here](https://github.com/epiforecasts/epinowcast/discussions/108).

@samabbott wrote:

> There is some interest in linking events where the report happens before the reference. An example of this is test positivity and symptom onset.
> 
> Potentially this could be handled by changing the indexing of the delay distribution (i.e add a negative `delay_min` which defaults to 0).
> 
> However, I am not sure this really strictly makes sense, especially when considering partially observed data. How do you know if something observed in real-time will eventually convert to a reference? If you don’t (which seems likely) then I assume you can’t use this information and hence this has no real-time benefit? Or you have to make a censoring adjustment of some kind.
> 
> Regardless there is demand so worth thinking about or at least thinking about documenting a solution that doesn’t require model changes (i.e updating the user on the definition of reference and report).

---

<div class="post-metadata">

**Author:** ![samabbott](https://dub1.discourse-cdn.com/flex005/user_avatar/community.epinowcast.org/samabbott/32/5_2.png) [@samabbott](https://community.epinowcast.org/u/samabbott)\
**Post date:** [29 September 2022 10:18 UTC](https://community.epinowcast.org/t/handling-negative-delays-between-reference-and-report/37/2 "2022-09-29T10:18:21Z")

</div>

Note some work on this includes the `Epiline` ([GitHub - BDI-pathogens/EpiLine: Bayesian Modelling in Epidemiology Case Line Lists](https://github.com/BDI-pathogens/EpiLine)) package from Robert Hinch at Oxford BDI.

They make use of a Johnson SU distribution (which has negative support) to handle this and model delays jointly but independently from case counts (i.e with counts as a convolution based on the delay but with delays treated as truncated but known).

I am not sure this can be ported as is into the `epinowcast` framework but is worth checking out.
