T O P I C R E V I E W |
xiangpei liu |
Posted - 12/22/2017 : 09:32:47 AM When I use the built-in Lorentz function to fit my data, the standard error of derived parameters (xc,w) is small. But When I build a user-defined Lorentz function with totally the same form as the the built-in one to fit the data, the standard error is always dozens of times larger. More strangely, I try to duplicate the built-in Lorentz function and use that to fit the data, I can't get the same result as the original built-in one. The derived standard error is still very large. Why?! How is the standard error calculated? What's the difference between the standard error calculation of built-in and user-defined function?
liu xiangpei |
3 L A T E S T R E P L I E S (Newest First) |
Django86 |
Posted - 06/23/2020 : 2:54:31 PM I know this topic is kinda old. But I am also having problems calculating the error by hand. Or, let's say, I can't figure our how to do it. Could you elaborate on how you calculated the error on the peak position of the Lorentz fits? Do you use the SSE for this?
Thanks |
xiangpei liu |
Posted - 12/23/2017 : 08:25:25 AM Really appreciate your quick response.
Maybe the performance depends on the details of input data. For my experimental data, the curve shows some asymmetry. So I firstly want to create a piecewise Lorentz function with two different widths. The fit can converge, but the derived standard error is really large. I have no idea with it. So I simplify the question and fit the data with a user-defined Lorentz function (actually it's a copy of the built-in Lorentz function) to test the fitting procedure. As I mentioned above, the standard error is ten thousands larger than that from the simple built-in Lorentz function.
Yes, after I read your test, I do the same test with some better data. The result is the same with you and it demonstrates the method of fitting with user-defined function is of no problem.
So the key point is why the user-defined fit can't work with my experiment data, even though I give the right start-point value.
quote: Originally posted by arstern
Hi,
I tested using the Lorentz function from Origin and then I created a user-defined function with the same Lorentz equation. From both methods, I was able to retrieve the same error and values. To test this, I used the sample data Lorentzian.dat located in C:\Program Files\OriginLab\Origin2018\Samples\Curve Fitting.
Problems that can occur: Parameters
I noticed if I set the wrong parameter values for the user-defined Lorentz function, then Origin had a difficult time determining the correct value. However, when input accurate parameters into the user-defined function then Origin was able to converge.
If you are inputting correct parameters, then maybe the Lorentz function is not the correct function type for your data.
Here is the Documentation: https://www.originlab.com/doc/Origin-Help/NLFit-Theory https://www.originlab.com/doc/Origin-Help/Lorentz-FitFunc
My Results:
![](http://www.originlab.com/ftp/forum_and_kbase/Images/compare.png)
Thanks Aviel OriginLab
![](http://www.originlab.com/ftp/forum_and_kbase/Images/experiment data.JPG) ![](http://www.originlab.com/ftp/forum_and_kbase/Images/fit result.JPG)
liu xiangpei |
arstern |
Posted - 12/22/2017 : 10:46:15 AM Hi,
I tested using the Lorentz function from Origin and then I created a user-defined function with the same Lorentz equation. From both methods, I was able to retrieve the same error and values. To test this, I used the sample data Lorentzian.dat located in C:\Program Files\OriginLab\Origin2018\Samples\Curve Fitting.
Problems that can occur: Parameters
I noticed if I set the wrong parameter values for the user-defined Lorentz function, then Origin had a difficult time determining the correct value. However, when input accurate parameters into the user-defined function then Origin was able to converge.
If you are inputting correct parameters, then maybe the Lorentz function is not the correct function type for your data.
Here is the Documentation: https://www.originlab.com/doc/Origin-Help/NLFit-Theory https://www.originlab.com/doc/Origin-Help/Lorentz-FitFunc
My Results:
![](http://www.originlab.com/ftp/forum_and_kbase/Images/compare.png)
Thanks Aviel OriginLab |
|
|