I have a time series that has a power-law $A \cdot t^{b}$ behaviour for $t\xrightarrow{}\infty$, while for low $t$ it is far from that. Something like this:
How can I make a linear fit and find an estimation for $A$ and $b$? How many points shall be discarded?
Edit: as you can see from the picture, taken from 3 independent runs, for $t < t_0$ (let's say, 10,000) the behaviour is quite random, and unrelated, while for $t > t_0$ the 3 series are almost parallel, meaning that they have the same exponent. A simple linear fit will give the value of this exponent (about -0.0093). But the problem is: how to identify $t_0$, in order to make the regression only in the range $[t_0, \infty]$ where it follows the model.
The best way should be to start from a physical model which allows to derive a convenient kind of function.
of course the function includes some parameters. With numerical data a non-linear regression would give approximate values of the parameters.
This is the best way because the parameters are likely to have physical significance, which is useful in practice.
If no physical model is available one have to guess some function susceptible to fit more or less correctly the data.
In the pesent case a linear piecewise function appears convenient (next figure).
The equation of the fitted curve drawn in red is : $$y(x)=(a_1x+b_1)H(\alpha-x)+(a_2x+b_2)\big(H(x-\alpha)-H(x-\beta)\big)+(a_3x+b_3)H(x-\beta))$$ $$\alpha=\frac{b_2-b_1}{a_1-a_2}\quad;\quad \beta=\frac{b_3-b_2}{a_2-a_3}$$ $H$ is the Heaviside function.
One can smooth the angular transition between the linear segments : One replace the Heaviside function by a approximate function of the logistic kind : $$H(\xi)\simeq \frac{1}{1+e^{-\gamma\:\xi}}\qquad \gamma>0$$ The more $\gamma$ is large the more this function is close to the Heaviside function.
Thus a smooth function to be fitted to the data can be : $$y(x)=\frac{a_1x+b_1}{1+e^{-\gamma_1\:(\alpha-x)}}+\frac{a_2x+b_2}{1+e^{-\gamma_1\:(x-\alpha)}}-\frac{a_2x+b_2}{1+e^{-\gamma_2\:(x-\beta)}}+\frac{a_3x+b_3}{1+e^{-\gamma_2\:(x-\beta)}}$$
The parameters to be found thanks to non-linear regression are : $a_1,b_1,a_2,b_2,a_3,b_3,\gamma_1,\gamma_2$. The two above equations relate $\alpha,\gamma$ to $a_1,b_1,a_2,b_2,a_3,b_3$.
From the graph provided in the question without numerical data one cannot proceed. Scannig the graph gives the coordinates of the pixels. But the numerical data obtained is not accurate enough and too scrambled.
On the figure below the red curve isn't fitted to data. This is only to show how the angular transitions are smoothed, for example with $\gamma_1=3$ and $\gamma_2=5$. These values must not be trusted.