Fit data to a model of exponential decay:
The resulting model function:
Show the data with the model:
Separate the time from the response:
Looking at residuals gives a good indication whether the model is a good fit:
Use a linear fit on the logarithm of the data for a model of exponential decay:
The logarithm of the exponential model is a linear model for the logarithm of the data:
The exponential model formed by exponentiating the model for the logarithm:
Exponential fit as parameters in a differential equation:
The model function is the solution of a differential equation:
Using caching is faster:
Find a constrained fit:
Fit to the model with positive amplitude and frequency between 1 and 2:
Compare the fitted model to the data:
The residuals show a pattern, indicating that the frequency constraint is too strict:
Give starting values for some parameters to get a better fit:
Search with all parameters starting at 1:
Search with a better starting value for the parameter c:
Compare the quality of the two fits:
Fit a surface to data in two-dimensions:
Find the fit starting from an approximate position for the peak:
Show the fitted surface with the data:
Fit a model to data in four dimensions:
The residual is comparable in size to the randomness added to the data: