Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Polynomoal Regression

Is there a way to automatically insert the coefficients of a second order
polynomial regression based on three or four data points into prescribed
cells or must they be copied from the equation derived by adding a trendline
to an XY-chart? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Polynomoal Regression

=LINEST(yVals, xVals^{1,2})

array enter into a row of two cells, or three if you want the final constant

should give you the coefficients a, b & c in =a*x^2 + b*x + c

yVals & xVals being equal sized ranges which could be named

Regards,
Peter T


"Steve R" wrote in message
...
Is there a way to automatically insert the coefficients of a second order
polynomial regression based on three or four data points into prescribed
cells or must they be copied from the equation derived by adding a

trendline
to an XY-chart? Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Polynomoal Regression

Thanks. Worked like a charm.

"Peter T" wrote:

=LINEST(yVals, xVals^{1,2})

array enter into a row of two cells, or three if you want the final constant

should give you the coefficients a, b & c in =a*x^2 + b*x + c

yVals & xVals being equal sized ranges which could be named

Regards,
Peter T


"Steve R" wrote in message
...
Is there a way to automatically insert the coefficients of a second order
polynomial regression based on three or four data points into prescribed
cells or must they be copied from the equation derived by adding a

trendline
to an XY-chart? Thanks.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Polynomoal Regression

Glad it works.

You mentioned copying the equation from a trend line, and in some
circumstances that might be a better approach. There's a long thread here

http://tinyurl.com/a2ysv
Subject: "Extract formula from Text box"
Date: Feb 2005

leading to "total package" solutions to create a 3rd order polynomial
trendline, get the formula, parse it, use it, and return calculated result.
Also some caveats regarding the importance of using precision even if a
precise result is not required, and problems with Linest (in some scenarios
with older versions of Excel).

Regards,
Peter T

"Steve R" wrote in message
...
Thanks. Worked like a charm.

"Peter T" wrote:

=LINEST(yVals, xVals^{1,2})

array enter into a row of two cells, or three if you want the final

constant

should give you the coefficients a, b & c in =a*x^2 + b*x + c

yVals & xVals being equal sized ranges which could be named

Regards,
Peter T


"Steve R" wrote in message
...
Is there a way to automatically insert the coefficients of a second

order
polynomial regression based on three or four data points into

prescribed
cells or must they be copied from the equation derived by adding a

trendline
to an XY-chart? Thanks.






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
The multiple regression tool - linear or non-linear regression? Statistical interest Excel Discussion (Misc queries) 2 February 6th 08 11:01 PM
regression AudreyJ Excel Discussion (Misc queries) 4 October 4th 06 10:37 PM
regression AudreyJ Excel Discussion (Misc queries) 0 October 4th 06 04:32 PM
regression swissforestry Excel Worksheet Functions 1 November 10th 05 11:59 PM
Regression Clark[_2_] Excel Programming 0 July 31st 03 11:58 PM


All times are GMT +1. The time now is 10:04 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"