[Math] Finding the change point in data from a piecewise linear function

linear algebraregressionstatistics

Greetings,

I'm performing research that will help determine the size of observed space and the time elapsed since the big bang. Hopefully you can help!

I have data conforming to a piecewise linear function on which I want to perform two linear regressions. There is a point at which the slope and intercept change, and I need to (write a program to) find this point.

Thoughts?

Best Answer

A simple answer would be to consider the break point a variable, call it x. Collect the points below x and perform a linear fit, returning the error (say sum of squared errors over the points). Collect the points above x and do the same. Then you can define f(x) as the total error over the two fits. Consider this a function in one variable and minimize it.

Related Question