#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Best fit Curve

Is there a program that will take data in rows and columns and return the
trendline equation? What I have in mind is similar to LINEST but would go
though all the possilbe curves (power, exponential, poly, etc) automatically
and return the best fit based on the highest R squared value. Currently, I
have to manually plot the data add a trendline and determine which is the
best fit.
Thanks,
Nick
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default Best fit Curve

You'd probably have to write up a macro to do that.

That said, i know what you mean, since i have to do that a lot as well.
Although from a statistics point of view, it's not the most ideal thing to do
since chasing R squared isn't how most modelling is done.

I'd be interested in any solution as well. I know that you can write a macro
to do this, by using the ML solutions as the formulas for most of the
equation types to then choose the best one.


"PowerUp321" wrote:

Is there a program that will take data in rows and columns and return the
trendline equation? What I have in mind is similar to LINEST but would go
though all the possilbe curves (power, exponential, poly, etc) automatically
and return the best fit based on the highest R squared value. Currently, I
have to manually plot the data add a trendline and determine which is the
best fit.
Thanks,
Nick

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 837
Default Best fit Curve

If you have n data points, a polynomial of degree n-1 will by definition have
R-squared equal to 1, but will likely be totally worthless as a predictor for
any other points on the curve. A better criteria would be "Adjusted
R-squared", which includes a penalty for inflating the number of parameters
http://en.wikipedia.org/wiki/Coeffic...on#Adjusted_R2
The ATP regression tool calculates adjusted R-squared, provided that data is
in columns and you include an intercept (the ATP calculation for both
R-squared and adjusted R-squared is wrong if data is in rows or if there is
no intercept).

All the chart trendlines can be computed in LINEST() (which can be used from
VBA), although some of them would require transformation of either the y or x
values.

If you would rather not go to VBA, you can use the INDEX() function to pick
off the R-squared value from LINEST. Prior to Excel 2003, the LINEST
R-squared value is wrong if there is no intercept.

Jerry

"PowerUp321" wrote:

Is there a program that will take data in rows and columns and return the
trendline equation? What I have in mind is similar to LINEST but would go
though all the possilbe curves (power, exponential, poly, etc) automatically
and return the best fit based on the highest R squared value. Currently, I
have to manually plot the data add a trendline and determine which is the
best fit.
Thanks,
Nick

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
C-CURVE SAIKAT Excel Discussion (Misc queries) 1 April 13th 07 02:46 PM
curve! function Shin Excel Worksheet Functions 1 November 17th 06 10:57 AM
curve fitting a charging capacitor type curve mcgradys Excel Discussion (Misc queries) 4 November 15th 05 12:46 PM
best curve fitting ladee_bird Charts and Charting in Excel 1 September 20th 05 07:25 AM
How do I add a curve of best fit? Kat Charts and Charting in Excel 1 January 25th 05 04:35 AM


All times are GMT +1. The time now is 06:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"