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
 Problems with sigmoidal fitting - Gompertz model
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

T_Swebocki

12 Posts

Posted - 11/23/2022 :  06:58:47 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

I am plotting MIC (Minimum inhibitory concentration) data. Data should be fitted to Gompertz model. Such model exists in OriginPro, however, usually doesn't work.

Example of data:



Error that occurs below:

(1) Parameter Initialization was called.
(2) Parameter Initialization was called.
(3) Parameter Initialization was called.
(4) ---------------Chi-Square---------------
Reduced Chi-sqr = 591.093861463
(5) -----Orthogonal Distance Regression-----
Reduced Chi-sqr = 115.76659027
COD(R^2) = 0.41875347893492
Iterations Performed = 2 
Total Iterations in Session = 2
(6) Fit did not converge - reason unknown.
Fitting was done with weights. Check weighting method and error bar values for possible inconsistencies, or try fitting again with weights turned off.


And this is for every data I use. I noticed that this model is called in OriginPro "SGompertz" and not "Gompertz".

The model in OriginPro seems the same to me as the one that works in other program that I use for plotting:
EQUATION:
M=logMIC - 1/Slope
Y= Bottom + Span*exp(-1*exp(Slope*(X-M)))



I have no idea why the fitting is not working in OriginPro. And that's a pity as I cad (and do!) process every of my data in OriginPro except MIC data...

Can anyone please help me to locate the problem and tell me how to solve it I am not really good at programming etc. and Origin is still after almost 5 years a mystery to me in some aspects... :P

Edited by - T_Swebocki on 11/23/2022 08:20:23 AM

YimingChen

1691 Posts

Posted - 11/23/2022 :  09:05:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The SGompertz function in Origin doesn't have the y offset term. You need to customize the fitting function to include the offset. See the figure below.



Please also find the attached fitting function file. Drag the .fdf file into Origin work space to install it. And try it on your data. You should be able to find the fitting function CustomizedSGompertz under the User Defined category in the NLFit dialog.
https://my.originlab.com/ftp/forum_and_kbase/Images/CustomizedSGompertz.FDF

James

Edited by - YimingChen on 11/23/2022 09:06:57 AM
Go to Top of Page

T_Swebocki

12 Posts

Posted - 11/23/2022 :  11:58:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello James,

Thanks - it fits perfectly! However, I still need to obtain MIC value for this (see below). A point of intersections of two linear fragments.


Is it possible to obtain coordinates for that point directly into the table?

Thank you in advance!
Go to Top of Page

YimingChen

1691 Posts

Posted - 11/23/2022 :  2:12:53 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You will need to define the derived parameter MIC = 10^logMIC in the Parameter Definition page in Fitting Function Builder (menu Tools->Fitting function Builder). Also to perform the fitting properly, you need to first convert the x values to log(x). Please check the attached project file and the modified fitting function. Thank you.

https://my.originlab.com/ftp/forum_and_kbase/Images/SGompertz.zip

Go to Top of Page

T_Swebocki

12 Posts

Posted - 11/23/2022 :  2:47:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi James,

Thanks for help.

I have two more questions regarding this fitting function:

1. After fitting, I can see logMIC but not MIC values in the table that appears after fitting is done. Is there anyway to make the table show MIC (so 10^logMIC) also?


2. Is there anyway to automatise the work a little bit? Basically, plots with log scale are not really useful to work (or publish) with this type of data. By using the model you provided I have to manually convert x scale to log (in separate column), then create two plots - one with linear x scale, one with logarithmic. I fit "logarithmic plot" to get MIC value, but then I need to also add fitting curve to a plot with linear scale.

Anyway thank you very, very much for your help! It really helps with my data for PhD!
Go to Top of Page

YimingChen

1691 Posts

Posted - 11/23/2022 :  5:09:22 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can define the fitting function below to use the original x values:
M=log(MIC) - 1/Slope
Y= Bottom + Span*exp(-1*exp(Slope*(log(X)-M)))

and use MIC instead of logMIC as parameter.

Check the updated fitting function and the project:

https://my.originlab.com/ftp/forum_and_kbase/Images/SGompertz2.zip

Go to Top of Page

T_Swebocki

12 Posts

Posted - 11/24/2022 :  03:34:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
James - thanks! Works exactly as intended!
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