The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 The derived standard error is very large
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

xiangpei liu

China
2 Posts

Posted - 12/22/2017 :  09:32:47 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

arstern

USA
237 Posts

Posted - 12/22/2017 :  10:46:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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:



Thanks
Aviel
OriginLab
Go to Top of Page

xiangpei liu

China
2 Posts

Posted - 12/23/2017 :  08:25:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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:



Thanks
Aviel
OriginLab



liu xiangpei
Go to Top of Page

Django86

1 Posts

Posted - 06/23/2020 :  2:54:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000