Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Display Coefficients of a Polynomial Trendline

I am trying to display the coefficients of a trendline in cells. This way I
can reference the cells and if the data changes, the coefficients are
dynamically updated (as opposed to if the trendline was just displayed on the
chart and you had to manually update every time).

I am using the following formulas:

Equation: y = (c2 * x^2) + (c1 * x ^1) + b
c2: =INDEX(LINEST(y,x^{1,2}),1)
C1: =INDEX(LINEST(y,x^{1,2}),1,2)
b = =INDEX(LINEST(y,x^{1,2}),1,3)

This works fine when I have the data set up in 2 columns
ex. Columns
X Y
1 5
3 6
5 7
but I can't seem to get the equations to work with the data set in rows
ex.
ROW
X 1 3 5
Y 5 6 7

The data is set in place based on some other stuff, so I'm trying to avoid
have to copy and transpose everything. Is there a way to incorporate the
TRANSPOSE function into the formulas? Or any other idea?

Thanks, any and all help is much appreciated!

-B

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Display Coefficients of a Polynomial Trendline

I think you can get what you want withou using INDEX

Select a range of 5 rows by 4 columns (we could increase or decrease the
column count later)
Type but do NOT enter you LINEST function (no INDEX)
Press Shift+Ctrl+Enter

Check out the resulting output. If you need to know what each item is
choose the help.
--
Thanks,
Shane Devenshire


"bmook" wrote:

I am trying to display the coefficients of a trendline in cells. This way I
can reference the cells and if the data changes, the coefficients are
dynamically updated (as opposed to if the trendline was just displayed on the
chart and you had to manually update every time).

I am using the following formulas:

Equation: y = (c2 * x^2) + (c1 * x ^1) + b
c2: =INDEX(LINEST(y,x^{1,2}),1)
C1: =INDEX(LINEST(y,x^{1,2}),1,2)
b = =INDEX(LINEST(y,x^{1,2}),1,3)

This works fine when I have the data set up in 2 columns
ex. Columns
X Y
1 5
3 6
5 7
but I can't seem to get the equations to work with the data set in rows
ex.
ROW
X 1 3 5
Y 5 6 7

The data is set in place based on some other stuff, so I'm trying to avoid
have to copy and transpose everything. Is there a way to incorporate the
TRANSPOSE function into the formulas? Or any other idea?

Thanks, any and all help is much appreciated!

-B

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 762
Default Display Coefficients of a Polynomial Trendline

bmook -

For data in rows, array-enter each:
=INDEX(LINEST(TRANSPOSE(known_y),TRANSPOSE(known_x )^{1,2}),1,1)
=INDEX(LINEST(TRANSPOSE(known_y),TRANSPOSE(known_x )^{1,2}),1,2)
=INDEX(LINEST(TRANSPOSE(known_y),TRANSPOSE(known_x )^{1,2}),1,3)

- Mike Middleton
http://www.DecisionToolworks.com
Decision Analysis Add-ins for Excel


"bmook" wrote in message
...
I am trying to display the coefficients of a trendline in cells. This way
I
can reference the cells and if the data changes, the coefficients are
dynamically updated (as opposed to if the trendline was just displayed on
the
chart and you had to manually update every time).

I am using the following formulas:

Equation: y = (c2 * x^2) + (c1 * x ^1) + b
c2: =INDEX(LINEST(y,x^{1,2}),1)
C1: =INDEX(LINEST(y,x^{1,2}),1,2)
b = =INDEX(LINEST(y,x^{1,2}),1,3)

This works fine when I have the data set up in 2 columns
ex. Columns
X Y
1 5
3 6
5 7
but I can't seem to get the equations to work with the data set in rows
ex.
ROW
X 1 3 5
Y 5 6 7

The data is set in place based on some other stuff, so I'm trying to avoid
have to copy and transpose everything. Is there a way to incorporate the
TRANSPOSE function into the formulas? Or any other idea?

Thanks, any and all help is much appreciated!

-B



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Display Coefficients of a Polynomial Trendline

When your data is in rows, you need to use semi-colon instead of comma, when you raise the x to powers in the linest equation.

b=INDEX(LINEST(L6:N6,L5:N5^{1;2}),1,3)

On Tuesday, October 21, 2008 3:25 PM bmoo wrote:


I am trying to display the coefficients of a trendline in cells. This way I
can reference the cells and if the data changes, the coefficients are
dynamically updated (as opposed to if the trendline was just displayed on the
chart and you had to manually update every time).

I am using the following formulas:

Equation: y = (c2 * x^2) + (c1 * x ^1) + b
c2: =INDEX(LINEST(y,x^{1,2}),1)
C1: =INDEX(LINEST(y,x^{1,2}),1,2)
b = =INDEX(LINEST(y,x^{1,2}),1,3)

This works fine when I have the data set up in 2 columns
ex. Columns
X Y
1 5
3 6
5 7
but I can't seem to get the equations to work with the data set in rows
ex.
ROW
X 1 3 5
Y 5 6 7

The data is set in place based on some other stuff, so I'm trying to avoid
have to copy and transpose everything. Is there a way to incorporate the
TRANSPOSE function into the formulas? Or any other idea?

Thanks, any and all help is much appreciated!

-B



On Tuesday, October 21, 2008 4:53 PM ShaneDevenshir wrote:


I think you can get what you want withou using INDEX

Select a range of 5 rows by 4 columns (we could increase or decrease the
column count later)
Type but do NOT enter you LINEST function (no INDEX)
Press Shift+Ctrl+Enter

Check out the resulting output. If you need to know what each item is
choose the help.
--
Thanks,
Shane Devenshire


"bmook" wrote:



On Tuesday, October 21, 2008 5:22 PM Mike Middleton wrote:


bmook -

For data in rows, array-enter each:
=INDEX(LINEST(TRANSPOSE(known_y),TRANSPOSE(known_x )^{1,2}),1,1)
=INDEX(LINEST(TRANSPOSE(known_y),TRANSPOSE(known_x )^{1,2}),1,2)
=INDEX(LINEST(TRANSPOSE(known_y),TRANSPOSE(known_x )^{1,2}),1,3)

- Mike Middleton
http://www.DecisionToolworks.com
Decision Analysis Add-ins for Excel


"bmook" wrote in message
...



On Tuesday, October 21, 2008 7:40 PM bmoo wrote:


Thanks Mike! I had tried to integrate the TRANSPOSE function this way
before, but was not using an array enter. Using the array enter worked
perfectly.

-B

"Mike Middleton" wrote:




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
coefficients of polynomial Doublee Excel Discussion (Misc queries) 5 March 9th 07 05:55 PM
Polynomial Treandline Coefficients Matt J Excel Worksheet Functions 6 November 7th 06 10:31 PM
how to get coefficients for Polynomial regression as for rgp() AZ Excel Worksheet Functions 1 January 26th 06 12:27 PM
using linest to generate 3rd order polynomial coefficients Incoherent Excel Worksheet Functions 4 September 14th 05 02:57 PM
Extracting Polynomial Coefficients Ken Hardman Excel Discussion (Misc queries) 6 September 7th 05 03:52 AM


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