THE HIGH ORDER POLYNOMIAL BEST FIT FUNCTION DOES NOT WORK !!!!! T.

G

Guest

THE HIGH ORDER POLYNOMIAL BEST FIT FUNCTION DOES NOT WORK !!!!!

Try back testing it yourself. I used the following data X & Y. The
coefficients looked great in the "Add trendline" but when used separately to
regenerate the data they were totally wrong????
63 0.09%
64 0.20%
65 0.37%
66 0.77%
67 1.22%
68 1.51%
69 1.79%
70 2.19%
71 2.87%
72 3.95%
73 4.92%
74 6.57%
75 9.13%
76 12.82%
77 18.40%
78 25.91%
79 35.35%
80 46.64%
81 57.93%
82 68.34%
83 77.04%
84 84.66%
85 90.35%
86 94.67%
87 97.23%
88 98.71%
89 99.51%
90 99.90%
91 99.99%
92 100.00%
 
G

Guest

I had the same problem with different data. The trendline fits nicely to the
data points, and the R² value is 1 or very close to one. Yet, when I use the
formula the values are WAY off.

Has Microsoft done any investigating into this?

***Excel 2003
 
G

Guest

Sorry for the long delay in responding, but you posted in an inappropriate
group. Since your concern is either with worksheet functions or with graph,
you should have posted to one of those groups, where you would have gotten an
almost immediate response. I see nothing in your post to suggest that Excel
crashed or caused a GPF, which is the topic of this group.

Details are lacking in your post. What degree polynomial? How are you
getting the coefficients to calculate the trendline? What does the data
represent?

If you displayed the trendline equation on a graph and copied the displayed
coefficients, then likely you used the heavily rounded values that Excel
displays by default. Right click on the trendline formula and format to
scientific notation with 14 decimal places. The chart polynomial trendline
is exceptionally good numerically (better than lm() in S-PLUS and R and far
better than GLM or REG in SAS). With your data the chart trendline computes
all coefficients of a 6th degree polynomial with 9-figure accuracy, despite a
condition number for X'X of 10^35.

Since you mention a "function", you may be using LINEST to fit the polynomial
http://www.stfx.ca/people/bliengme/ExcelTips/Polynomial.htm
In Excel 2003, LINEST also gives 9-figure accuracy for a 6th degree
polynomial with your data. In earlier versions, LINEST only gives 2-figure
accuracy for the same problem. That pre-2003 LINEST got any figures right
with a problem this ill-conditioned surprised me
http://groups.google.com/group/microsoft.public.excel/msg/969a2bb33e6cdbb8

More generally, I question whether you should be fitting a polynomial at
all. Your data suggests a monotonic S-shaped curve, whereas the polynomial
will wiggle around near the asymptotes. There may be standard models to fit
your data, given a knowledge of how it was produced. In the absence of that
knowledge, you might try a nonlinear fit to a monotonic S-shaped curve, such
as a 4 or 5-parameter logistic.
y = d + (a-d)/(1+(x/c)^b)^g
Assume g=1 for the 4-parameter. d is the upper asymptote (near 1) and b is
the lower asymptote(near 0). If g=1, then c is the value of x for which y is
halfway between a and d.

Jerry
 
G

Guest

One other thought; if you are using the chart trendline coefficients, is your
chart a "Line" chart or an "XY (Scatter)" chart?

The misleadingly named "Line" chart would also give you unexpected results,
because by definition it ignores your x-values and fits your y-values to
x-values of 1,2,3,... It does this because it assumes that the x's (if
supplied at all) are category labels, not numbers (why it even offers to fit
a trendline in that circumstance is a mystery to me).

What you want is the "XY (Scatter)" chart.
 
G

Guest

Jerry,

Thanks for replying.

I had a similar problem to what Redsky reported as far as xy values being
fit to a trend line. I wish I still has the data that I was using at the
time, but I've long disposed of it. What I remember is that it was an XY
Scatter graph, and I found that when I fit a trendline to it with an order
higher than 3 that the line would cross each point and the R value would be
1. However, when I put the x value into the equation of the trendline the y
value it yielded was not correct.

If I have this problem again, which group should I post it to? (Charts?)

Mike
 
G

Guest

Jerry,

I was able to generate the error again. I have an excel sheet with the XY
values, the trendline formulas, R values and two charts. If you'd like to
take a look you can email me at mike at crazybass2.com or reply here with an
email address.

Mike
 
G

Guest

crazybass2 said:
Jerry,

I was able to generate the error again. I have an excel sheet with the XY
values, the trendline formulas, R values and two charts. If you'd like to
take a look you can email me at mike at crazybass2.com or reply here with an
email address.

Mike

As I wrote in my first post to this thread.

That is confirmed to be the issue after examining your file. You attempted
to predict using polynomials where almost all coefficients were rounded to
only one significant figure. Excel calculated many more correct figures, but
it is up to you to format the equation so that you can see them.

Jerry
 
Top