Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default How to create a regression line from Excel data points

I was wondering if any of you knew how to create an exponential regression
from a data set in the form of C1e^(C2x). This is the same fashion in which
Excel plots an exponential trend line, but I can't find the right function to
do this. Is there a way to use the same function that Excel does to make its
graph trend lines in Visual Basic. Here is an example of what I need:

X=[1,2,3,4,5]
y=[4,6,10,18,34]

I need a function that would take those variables and, from them, set a
C1e^C2x curve, and spit the C1 and C2 variable back in order to be able to
pull other points off of that regression line.

Let me know if more clarification is necessary and if you have any ideas. I
have been trying to use Growth and LegEst functions in Excel in conjunction
with Visual Basic, but they don't SEEM to be exactly what I am looking for,
but I can find any documentation on other way to do this.

Thanks again everyone,

B
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default How to create a regression line from Excel data points

Have a look at Excel's LOGEST() function. It returns a matrix. Make sure
to have a look at the help for this function for clarification.

Hope this helps,
Dominik.



Beavoid schrieb:
I was wondering if any of you knew how to create an exponential regression
from a data set in the form of C1e^(C2x). This is the same fashion in which
Excel plots an exponential trend line, but I can't find the right function to
do this. Is there a way to use the same function that Excel does to make its
graph trend lines in Visual Basic. Here is an example of what I need:

X=[1,2,3,4,5]
y=[4,6,10,18,34]

I need a function that would take those variables and, from them, set a
C1e^C2x curve, and spit the C1 and C2 variable back in order to be able to
pull other points off of that regression line.

Let me know if more clarification is necessary and if you have any ideas. I
have been trying to use Growth and LegEst functions in Excel in conjunction
with Visual Basic, but they don't SEEM to be exactly what I am looking for,
but I can find any documentation on other way to do this.

Thanks again everyone,

B

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default How to create a regression line from Excel data points

I have been looking at the LOGEST() function; it says it is an exponential
curve, but doesn't seem to return an exponential, but a logrythmic one. I
need something in the form of C1*e^(C2*X)

Am I wrong? Is it actually returning the constants C1, C2 somehow?

Thanks for the response,

B

"Dominik Petri" wrote:

Have a look at Excel's LOGEST() function. It returns a matrix. Make sure
to have a look at the help for this function for clarification.

Hope this helps,
Dominik.



Beavoid schrieb:
I was wondering if any of you knew how to create an exponential regression
from a data set in the form of C1e^(C2x). This is the same fashion in which
Excel plots an exponential trend line, but I can't find the right function to
do this. Is there a way to use the same function that Excel does to make its
graph trend lines in Visual Basic. Here is an example of what I need:

X=[1,2,3,4,5]
y=[4,6,10,18,34]

I need a function that would take those variables and, from them, set a
C1e^C2x curve, and spit the C1 and C2 variable back in order to be able to
pull other points off of that regression line.

Let me know if more clarification is necessary and if you have any ideas. I
have been trying to use Growth and LegEst functions in Excel in conjunction
with Visual Basic, but they don't SEEM to be exactly what I am looking for,
but I can find any documentation on other way to do this.

Thanks again everyone,

B


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default How to create a regression line from Excel data points

How about taking the natural logarithm of both sides of the equation y =
C1*e^C2x to get a new linear equation. Then use LINEST on that to get your
coefficients. Then revert back to the logarithmic form.

Just a thought...

Eric

"Beavoid" wrote:

I have been looking at the LOGEST() function; it says it is an exponential
curve, but doesn't seem to return an exponential, but a logrythmic one. I
need something in the form of C1*e^(C2*X)

Am I wrong? Is it actually returning the constants C1, C2 somehow?

Thanks for the response,

B

"Dominik Petri" wrote:

Have a look at Excel's LOGEST() function. It returns a matrix. Make sure
to have a look at the help for this function for clarification.

Hope this helps,
Dominik.



Beavoid schrieb:
I was wondering if any of you knew how to create an exponential regression
from a data set in the form of C1e^(C2x). This is the same fashion in which
Excel plots an exponential trend line, but I can't find the right function to
do this. Is there a way to use the same function that Excel does to make its
graph trend lines in Visual Basic. Here is an example of what I need:

X=[1,2,3,4,5]
y=[4,6,10,18,34]

I need a function that would take those variables and, from them, set a
C1e^C2x curve, and spit the C1 and C2 variable back in order to be able to
pull other points off of that regression line.

Let me know if more clarification is necessary and if you have any ideas. I
have been trying to use Growth and LegEst functions in Excel in conjunction
with Visual Basic, but they don't SEEM to be exactly what I am looking for,
but I can find any documentation on other way to do this.

Thanks again everyone,

B


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default How to create a regression line from Excel data points

LogEST gives the exponential parameters; I need a natural exponential form of
the equation. I am not sure that taking the ln woould work. I'll look into
it though.

Thanks

B

"Eric G" wrote:

How about taking the natural logarithm of both sides of the equation y =
C1*e^C2x to get a new linear equation. Then use LINEST on that to get your
coefficients. Then revert back to the logarithmic form.

Just a thought...

Eric

"Beavoid" wrote:

I have been looking at the LOGEST() function; it says it is an exponential
curve, but doesn't seem to return an exponential, but a logrythmic one. I
need something in the form of C1*e^(C2*X)

Am I wrong? Is it actually returning the constants C1, C2 somehow?

Thanks for the response,

B

"Dominik Petri" wrote:

Have a look at Excel's LOGEST() function. It returns a matrix. Make sure
to have a look at the help for this function for clarification.

Hope this helps,
Dominik.



Beavoid schrieb:
I was wondering if any of you knew how to create an exponential regression
from a data set in the form of C1e^(C2x). This is the same fashion in which
Excel plots an exponential trend line, but I can't find the right function to
do this. Is there a way to use the same function that Excel does to make its
graph trend lines in Visual Basic. Here is an example of what I need:

X=[1,2,3,4,5]
y=[4,6,10,18,34]

I need a function that would take those variables and, from them, set a
C1e^C2x curve, and spit the C1 and C2 variable back in order to be able to
pull other points off of that regression line.

Let me know if more clarification is necessary and if you have any ideas. I
have been trying to use Growth and LegEst functions in Excel in conjunction
with Visual Basic, but they don't SEEM to be exactly what I am looking for,
but I can find any documentation on other way to do this.

Thanks again everyone,

B



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default How to create a regression line from Excel data points

I found a great method! Very elegant and simple

C1=EXP(INDEX(LINE(LN(y),x),1,2))
C2=INDEX(LINEST(LN(y),x),1)

That's it! Then, just name the cells that those are in and call them from
VBA. Just thought I would let everyone know. Thanks for your time everyone.

B

"Beavoid" wrote:

LogEST gives the exponential parameters; I need a natural exponential form of
the equation. I am not sure that taking the ln woould work. I'll look into
it though.

Thanks

B

"Eric G" wrote:

How about taking the natural logarithm of both sides of the equation y =
C1*e^C2x to get a new linear equation. Then use LINEST on that to get your
coefficients. Then revert back to the logarithmic form.

Just a thought...

Eric

"Beavoid" wrote:

I have been looking at the LOGEST() function; it says it is an exponential
curve, but doesn't seem to return an exponential, but a logrythmic one. I
need something in the form of C1*e^(C2*X)

Am I wrong? Is it actually returning the constants C1, C2 somehow?

Thanks for the response,

B

"Dominik Petri" wrote:

Have a look at Excel's LOGEST() function. It returns a matrix. Make sure
to have a look at the help for this function for clarification.

Hope this helps,
Dominik.



Beavoid schrieb:
I was wondering if any of you knew how to create an exponential regression
from a data set in the form of C1e^(C2x). This is the same fashion in which
Excel plots an exponential trend line, but I can't find the right function to
do this. Is there a way to use the same function that Excel does to make its
graph trend lines in Visual Basic. Here is an example of what I need:

X=[1,2,3,4,5]
y=[4,6,10,18,34]

I need a function that would take those variables and, from them, set a
C1e^C2x curve, and spit the C1 and C2 variable back in order to be able to
pull other points off of that regression line.

Let me know if more clarification is necessary and if you have any ideas. I
have been trying to use Growth and LegEst functions in Excel in conjunction
with Visual Basic, but they don't SEEM to be exactly what I am looking for,
but I can find any documentation on other way to do this.

Thanks again everyone,

B

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
Help with data points in line graph in Chart function in Excel. BDF Excel Worksheet Functions 0 May 18th 10 11:29 PM
Regression - trend line vs. data points?? WA Charts and Charting in Excel 1 January 15th 10 07:54 PM
How can I create a line chart with 800,000 data points bigchartguy Excel Discussion (Misc queries) 3 April 22nd 09 04:00 AM
How to draw a regression line on 7000+ dated data with Excel 2007 Gordon Lee Charts and Charting in Excel 2 October 16th 08 12:44 AM
Line charts with missing data points in Excel 2007 turen Charts and Charting in Excel 2 August 22nd 07 06:08 PM


All times are GMT +1. The time now is 09:05 AM.

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"