Hi,
I have a graph with a trendline and I want to be able to display its formula on a cell so I can use it for calculations. Is there any way to do that? I am trying to do a polynomial regression.
Thanks
Hi,
I have a graph with a trendline and I want to be able to display its formula on a cell so I can use it for calculations. Is there any way to do that? I am trying to do a polynomial regression.
Thanks
You can't display the formula per se, but the LINEST and LOGEST functions return an array containing all the parameters of the regression. If you want to see how, post some data and the plot with a trendline.
For the given x-values and corrosponding y-values I wish to obtain coefficients for the best polynomium of 2nd degree, i.e. y=a0+a1*x+a2*x^2.
How do I obtain the values a0, a1 and a2?
x y
1 1
3 -2
6 5
8 3
11 -4
15 2
20 -1
I know I can get excel to show the equation for the trend line in a diagram, but I wish those values be put in a excel cell so I can use them for further calculations.
Any help?
- Kermit
I forgot to post a sheet with the data points and the curve in my previous post.
Sorry
I think I have solved the problem myself.
I use the function linest(...)
If I want the coefficients for a polynomium of degree 3 the syntax is
linest([y-values];[x-values]^{1,2,3})
For a 5th degree the syntax would be
linest([y-values];[x-values]^{1,2,3,4,5})
- Kermit
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks