View Single Post
  #8   Report Post  
Jerry W. Lewis
 
Posts: n/a
Default

This Least Squares problem is ridiculously difficult numerically.
Dedicated statistics packages will refuse to do it at all, unless you
first orthogonalize the predictors yourself.

Excel dates are stored as the number of days since 1900, so the numeric
values in column A are

27760, 27760, 28355, 28520, 28581, 28672, 28678, 28793, 28873

which has a coefficient of variation (relative standard deviation)
<1.5%. Consequently the condition number of X'X for solving the normal
equations is <3E+80, which means that Excel would potentially need
between 5 and 6 times its actual precision for LINEST to reliably
recognize that X'X is invertable.

Correct coefficients are (to 15 digits; obtained algebraically in Maple)

1.13729790060870E+15 (intercept)
-2.39465281115860E+11 (x)
2.10079765828648E+07 (x^2)
-9.82899962202329E+02 (x^3)
2.58667425348765E-02 (x^4)
-3.63042771974839E-07 (x^5)
2.12298835919803E-12 (x^6)

From this, you can see that chart coefficients are accurate to around
4 figures on this problem (which indicates just how good the chart
algorithm is). LINEST in Excel 2003 gives about 3 figure accuracy.

Jerry

Sanjay Kumar Limbikai wrote:

Hello Jerry,

Here is the data

Date Data Points
01/01/1976 3138
01/01/1976 3247
08/18/1977 3163
01/30/1978 3185
04/01/1978 3014
07/01/1978 3199
07/07/1978 3116
10/30/1978 3185
01/18/1979 3074

Though this is the first few records of my data,
I used to draw a chart of poly trend line of 6th order (Excell2002),
and used to extract constants - =LINEST(B2:B10,A2:A10^{1,2,3,4,5,6})
the coefficients are different as of trend line equ.

Sanjay