
Grid search for a single structural change (partition) point
Source:R/piecewise_ensemble.R
find_partition_point.RdScans a grid of candidate partition points with increments of size 1, as described in the manuscript, and selects the point minimising the pooled mean squared error, subject to a minimum number of observations on each side.
Arguments
- t, y
Time index and cumulative counts of the open window.
- min_obs
Minimum number of observations required on each side of the candidate split (default 12, as in Simulation Scenarios 1 and 3 of the manuscript; use 15 to match Scenario 2).
- criterion, beta_fixed
Passed to
fit_ensemble().