# How to measure the error between modeled and observed data?

Consider a scenario where observed data is represented in grey and modelled data in red, as below

Here, the x-axis is a position, and the y-axis is an expected time, so that the slope defines, in a way, a speed.

The coefficient of determination, $$R^2$$, is commonly employed to evaluate the model's goodness-of-fit. However, I am interested in distinguishing between two specific sources of misfit, illustrated as follows:

• Cases where the model fails to align with the data points but retains a local alignment in terms of the slope should not necessarily be considered a "misfit", as this might be a propagation of neighbouring dynamics (the slope in the data defines a speed, which is bounded)

• Other instances where the model neither aligns with the data points nor matches the local slope

Could you suggest a mathematical method to quantify and differentiate these two types of misfits? What would be the optimal approach to assess them? Is there a better measure than $$R^2$$?

I think the usual measures of performance like mean squared error and mean absolute error do what you want (and, at least depending on the exact calculation, $$R^2$$ is just a deterministic function of mean squared error).