This subject was already treated in a previous thread posed by mendhak on the 4 th of the current month. If you want to do the programming yourself, then you can find the maths foundation (regression analysis) in any one "thick" books on stats. The linear trend is the simplest form – mendhak showed how - and comes in most books on "decision making analysis".
Any way, if you don´t mind to use MS Excel, this tool provides a method known as "least squares" that adds a trend function (the one that fits data the best). You are supposed to choose among a linear, a logarithmic, a polynomial (up to order 6), a power, an exponencial or a (simple) moving average. MS Excel returns the parameters of each function that fits data points the best. It is up to you which function to choose based upon the value of R^2 (the closer to 1 the better).
Last edited by Rassis; Feb 25th, 2005 at 09:37 AM.
...este projecto dos Deuses que os homens teimam em arruinar...