Troubleshooting NonlinearModelFit in Mathematica

In summary: Alternatively, you could try using different fitting functions or methods. In summary, the conversation is about a Mathematica assignment for a tutorial on the formation and decay of pyrene excimer in solution. The student is having trouble getting the fit of the function to converge and is looking for help or suggestions on alternative ways to express the function. The homework statement asks for finding coefficients and providing a plot of the data with the fit function. The student shares their attempt at a solution and asks for advice on fixing the issue with the fourth coefficient.
  • #1
cep
51
0
Hello, I'm working on this Mathematica assignment, just basic tutorial-type stuff (you can ignore the details about pyrene, not important), and the fit on this function won't converge. Someone in my class said it converged fine, so I was wondering if anyone notices any errors in my work. Alternatively, can you think of any alternative ways to express the function?

Thanks!

Homework Statement




3. Formation and Decay of Pyrene Excimer in Solution

The traces for pyrene fluorescence (see Experiment 3) show a fast rise and a slower fall processes which correspond to a complex kinetic of the formation and decay of the pyrene excimer in solution. The evolution of the excimer fluorescence intensity I(t) in time t can be described by the following equation:

I(t) = -Ae-kat+Be-kbt

Data are provided in a file “emission_data” with time given in the first column, while the fluorescence intensity given in the second column.

REPORT:
(1) Find coefficients A, B, ka and kb. Estimate standard error and confidence levels for these parameters. Hint: see Mathematica help menu for function NonlinearModelFit.
(2) Provide plot of data with the superimposed fit function


Homework Equations



Mathematica knowledge

The Attempt at a Solution



See attached screenshot.

I can get 3/4 coefficients, but I don't know if they're correct due to the fourth one failing to converge, and I can't make the plot without all coefficients!
 

Attachments

  • screen-capture-12.png
    screen-capture-12.png
    7.9 KB · Views: 593
Physics news on Phys.org
  • #2
Non-linear function fits can be very sensitive to the starting values of the function parameters. I'd think there would be an option to provide starting 'guesses'. If so, playing around with the starting values could fix the problem.
 

Related to Troubleshooting NonlinearModelFit in Mathematica

What is Mathematica NonlinearModelFit?

Mathematica NonlinearModelFit is a built-in function in the Mathematica software that is used for fitting a mathematical model to a set of data. It is commonly used in scientific and engineering fields for data analysis and modeling.

What types of models can be fitted using NonlinearModelFit?

NonlinearModelFit can fit various types of models, including polynomial, exponential, logarithmic, power, and trigonometric functions. It can also fit custom user-defined models.

How does NonlinearModelFit work?

NonlinearModelFit uses the method of least squares to find the best-fit parameters for a given model. This involves minimizing the sum of the squared differences between the model and the actual data points.

What are the required inputs for NonlinearModelFit?

The required inputs for NonlinearModelFit are the data points to be fitted, the model function, and the initial values for the model parameters. Additional optional inputs include weights for the data points, constraints on the parameters, and method options.

Can NonlinearModelFit handle large data sets?

Yes, NonlinearModelFit can handle large data sets as it uses efficient numerical algorithms for fitting. It also has options for parallel processing, which can further improve the speed for large data sets.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
403
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
18
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
1K
  • Differential Equations
Replies
7
Views
537
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
Replies
16
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
Back
Top