Fit a non-linear function to this time series

Click For Summary
SUMMARY

The discussion focuses on fitting a non-linear function to a time series represented by the equation n(t) = n_max - (n_max - n_start)*exp(-t/tau). The user seeks to determine the parameters n_start, n_max, and tau using Excel, despite challenges with Excel's solver and trendline capabilities. While Matlab's fminsearch is suggested as an alternative, the user prefers a solution within Excel. The conversation also highlights confusion regarding the definitions of n_max and n_start, with suggestions to rename n_max to n_end for clarity.

PREREQUISITES
  • Understanding of non-linear regression techniques
  • Familiarity with Excel's Solver tool
  • Knowledge of exponential functions and their properties
  • Basic experience with time series analysis
NEXT STEPS
  • Research how to implement non-linear regression in Excel
  • Learn about the use of Matlab's fminsearch for parameter estimation
  • Explore advanced Excel functions for trend analysis
  • Study the mathematical properties of exponential decay functions
USEFUL FOR

Data analysts, researchers working with time series data, and anyone interested in fitting non-linear models using Excel.

MacIntoShiba
Messages
7
Reaction score
1
TL;DR
Fit non-linear function to a time series
I have an experimantally obtained time series: n_test(t) with about 5500 data points. Now I assume that this n_test(t) should follow the following equation:
n(t) = n_max - (n_max - n_start)*exp(-t/tau).

How can I find the values for n_start, n_max and tau so as to find the best fit to the n_test(t) time series? I am aware that with Matlab this could be accomplished with fminsearch, however I would like to implement something in Excel.
 
Physics news on Phys.org
Excel should find exponential fit functions, too. Not sure about the offset, however.
You can also define "best fit" manually by calculating the fit quality as function of these parameters (in any way you like) and then use the solver to minimize that cell by changing the three parameters.
 
Excel is not really working along, doesn't have a usefull trendline I can plot through it. The solver doesn't really work either. Ill now finding the paramters by hand. For now that will suffice, this is not a daily recurring task.
 
MacIntoShiba said:
Summary:: Fit non-linear function to a time series

I have an experimantally obtained time series: n_test(t) with about 5500 data points. Now I assume that this n_test(t) should follow the following equation:
n(t) = n_max - (n_max - n_start)*exp(-t/tau).

How can I find the values for n_start, n_max and tau so as to find the best fit to the n_test(t) time series? I am aware that with Matlab this could be accomplished with fminsearch, however I would like to implement something in Excel.
I don't get the formula - is nmax supposed to be the max between start and t? if so, when is the max ever anything but the start as you begin by subtracting n start from itself? Then if nstart >0 each iteration of the exponential term remains zero - you never get a value to multiply by the exponential.
 
Last edited:
BWV said:
I don't get the formula - is nmax supposed to be the max between start and t? if so, when is the max ever anything but the start as you begin by subtracting n start from itself? Then if nstart >0 each iteration of the exponential term remains zero - you never get a value to multiply by the exponential.
A better name for n_max is n_end. Thus in the beginning the concentration is n_start, after an infinite amount of time it's n_max (or n_end, better name).
 
MacIntoShiba said:
A better name for n_max is n_end. Thus in the beginning the concentration is n_start, after an infinite amount of time it's n_max (or n_end, better name).
Why the minus term? Can’t you model it as simple exponential decay, then you can linearize by taking the log
 
MacIntoShiba said:
Excel is not really working along, doesn't have a usefull trendline I can plot through it. The solver doesn't really work either. Ill now finding the paramters by hand. For now that will suffice, this is not a daily recurring task.
That problem description doesn't help understanding what went wrong.
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 30 ·
2
Replies
30
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K