broken_stick function

Perform broken-stick regressions