Cases moving from one stage to the next (charges to convictions,
admissions to releases) take time, so a rate of this period's outflow
over this period's inflow mixes cohorts. jpipe() divides the
numerator summed over a window by the denominator summed over the same
window moved back by the lag between the stages.
Arguments
- num
The counts of the later stage, in time order: numbers from 0.
- den
The counts of the earlier stage: numbers from 0, one per
num.- win
The window, in periods: a whole number from 1.
- lag
The lag between the stages, in periods: a whole number from 0.
- grp
NULL, or the group of each period (each group in time order): labels.