How to perform a linear regression to data which has transient behavior and saturation? I am trying to linear-fit data in intermediate time scale (theoretically assumed to be linear) in the absence of the transient behavior in initial time and saturation after some time. For instance, like in the figure below (drawn by hand). Is there a statistcally meaningful way of applying a linear regression in the intermediate time scale? How the intermediate time scale can be chosen appropriately?

I have attempted calculating the OLS parameter $\hat{\beta}_{1}$ ($Y = \hat{\beta}_{0} + \hat{\beta}_{1}X$) through sliding a window by choosing some window size (some sort of local regression, I guess?). But in that case, I was only able to guess a number heuristically without $\pm \Delta\hat{\beta}_{1}$.

I think your approach makes sense:

*

*Find a window size and shift width that is not too small to get confused by the noise and not too large to smooth away the start and end of the linear middle part.

*Plot the $\hat\beta_1$ values for each window.

*In the plot, find the region where $\hat\beta_1$ is roughly constant.

*Apply OLS to this region.

The window size and step width in the first task should be obtained by trying different values and checking the results.
However, if you knew more about the behavior in the initial and saturation phases, e.g. if you knew that those regions are linear, too, just with a different slope compared to the middle part, you could apply a model that consists of three regressions in three parts (initial: $[t_1, t_2]$, middle: $[t_2, t_3]$, saturation: $[t_3, t_4]$), each with different fitting parameters, and with the borders $t_2, t_3$ between those parts being fittable parameters, too.
