Jushan Bai and Pierre Perron, "Computation and Analysis of Multiple Structural Change Models", Journal of Applied Econometrics, Vol. 18, No. 1, 2003, pp. 1-22.