Clone of Linear Regression as ODE modeling with data

Jennifer Fruend
Here we have created a stock-flow model for a linear function. Using a converter we can adjust the parameters m and b to find the least squares line through a set of data points.

1. Observe that the input values of the converter [data] need to be integer multiples of TimeStep() away from TimeStart() in order to have exactly one nonzero entry in the squared error variables.

2. You may enter your data points into [data] as a converter. However, you must enter the values from the time column as "times" in the [squared error] variable formula.

3. Because the model is for a linear function, Euler's Method solves the ODE exactly with any step size. This means you can adjust the step size according to the resolution of the data.