
Offline segmentation of daily counts by penalised likelihood
Source:R/incidence_ensemble.R
bic_segment.RdBinary segmentation of the daily-count series: a segment is split at the
candidate day maximising the summed ensemble log-likelihood of the two
halves, and the split is kept only if it lowers the Bayesian information
criterion, with the split charged for the parameters of one additional
curve and the change location. The parameter count of an ensemble is the
weight-averaged count of its members (three per curve with Poisson counts,
four with negative binomial counts):
the members are alternative descriptions of a single mean, not additive
components. Each half is fitted by fit_ensemble_incidence().
Arguments
- x
Daily counts.
- d_min
Minimum segment length.
- family, weights, beta
Passed to
fit_ensemble_incidence().- step
Spacing of the coarse candidate grid (days); the optimum is then refined at unit spacing within
stepdays.- max_cuts
Maximum number of change points.