+ Reply to Thread
Results 1 to 6 of 6

Exponential Regression

  1. #1
    Registered User
    Join Date
    06-03-2014
    Posts
    2

    Exponential Regression

    I am trying to create a function that will run an exponential regression for a range of data, my code thus far is as follows to figure out the A factor:
    The formula I am using worked for me as an excel formula.

    Please Login or Register  to view this content.
    Any suggestions would appreciated!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Exponential Regression

    What worked for you as an Excel formula?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Exponential Regression

    Please Login or Register  to view this content.
    The's the a in y = a*m^x

  4. #4
    Registered User
    Join Date
    06-03-2014
    Posts
    2

    Re: Exponential Regression

    I will try the regression estimation using the power fit function y = a*m^x above too. I will see how close this fits the data sets. Thanks!

    I was hoping to be able to estimate the a in the function y = a*exp^(b*x).

    The excel formula I used to do this was = EXP(INDEX(LINEST(LN(yRange), xRange),1,2))

    When the vba function runs it returns an 'Object required' error.

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,861

    Re: Exponential Regression

    In Excel, an array function like {=ln(yrange)} will return an array of numbers. This kind of array syntax does not translate into VBA. In order to do this, you will need to do one of two things before calling the LINEST() function in VBA:

    1) Add a helper column in the spreadsheet that will calculate the logs. In an adjacent column, a simple spreadsheet formula like =ln(B2) copied down will create another range. This "helper column" will then be used as yrange in VBA and passed to the LINEST() function.

    2) Have a loop upstream of the Linest function that will store the logs in a VBA array. Something like
    Please Login or Register  to view this content.
    I would also point out that y=A*e^(bx) is equivalent to A*m^x where m=e^b, so the two regressions should be no different from each other.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Exponential Regression

    Quote Originally Posted by CLaf View Post
    I will try the regression estimation using the power fit function y = a*m^x above too.
    A power function has the form y=a*x^m.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Interpolate exponential regression (using Logest function?)
    By kriss473 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-13-2013, 06:19 PM
  2. Exponential Regression
    By montreal1775 in forum Excel General
    Replies: 1
    Last Post: 10-27-2010, 03:55 PM
  3. Bi-Exponential Fit
    By tucopup in forum Excel General
    Replies: 1
    Last Post: 05-14-2008, 06:10 AM
  4. RSQ, but exponential
    By wmorrison49 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 12-03-2007, 10:04 AM
  5. Exponential values
    By Duke Carey in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 09-06-2005, 05:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1