dating()
computes break points that globally minimizes SSR via dynamic programming approach.
To avoid recursion depth increases as number of breaks in the model increases, a temporary
array is used to store optimal partition with corresponding SSR for all permissible
subsamples for all 1:m-1 breaks. For the m-th break, the problem becomes finding where to insert
the last feasible m+1-th segment into the sample partitioned by m-1 breaks
to obtain minimum SSR over the sample
dating(y, z, h, m, q, bigT)
A list containing the following components:
minimum global SSR
Vector of dates (optimal minimizers)
Associated SSRs
matrix of dependent variable
matrix of regressors with coefficients allowed to change across regimes
minimum length of segment
maximum number of breaks
number of z
regressors
sample period T