diagnose function

Diagnose the fit of a segmented time series