You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I frequently work with generation interval distributions and need to convert them from parametric specifications to probability mass functions. I can do some of this conversion with dpcens() but not all because dpcens() only supports right-truncation correction via D. I also need to left-truncate and renormalize my generation interval distribution PMF because the renewal equation assumes no same-day transmission so I need to truncate the lower bound of the PMF at 1 day.
in some sense it could intoduce a API change (but I could handle with lifecycle) as maybe D should become D_lower and D_upperr or potentially even a 2 length vector (i.e (0, Inf) by default and then here (1, 27).
I like the 2-length vector idea. It feels clean to me.
Describe alternatives you've considered
The D_upper and D_lower argument idea would also add this functionality.
Thanks for this @zsusswein. I agree this makes sense for both the R and stan code.
I think I agree that the D as a vector might be the best option. This throws up some thoughts:
In R is length 1 allowed as this could be used to get the current behaviour?
In Stan this will mean appending into a array or always passing a array (of length individual delays and with length 2. This could be a hassle but maybe its not that bad?
Is your feature request related to a problem? Please describe.
I frequently work with generation interval distributions and need to convert them from parametric specifications to probability mass functions. I can do some of this conversion with
dpcens()
but not all becausedpcens()
only supports right-truncation correction viaD
. I also need to left-truncate and renormalize my generation interval distribution PMF because the renewal equation assumes no same-day transmission so I need to truncate the lower bound of the PMF at 1 day.Describe the solution you'd like
As suggested by @seabbs in this comment:
I like the 2-length vector idea. It feels clean to me.
Describe alternatives you've considered
The
D_upper
andD_lower
argument idea would also add this functionality.Additional context
Here's a reproducible script where I'm using
dpcens()
and manually applying the correction.The text was updated successfully, but these errors were encountered: