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
 All Forums
 Origin Forum
 Origin Forum
 Fitting multiple peaks using NLSF

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
b.harris Posted - 09/26/2005 : 9:45:42 PM
Origin Version (Select Help-->About Origin): 7.5
Operating System: XP

I am analysing data which conceptually is composed of mutiple lognormal populations. I am trying to fit multiple lognormal curves to this data set using the NLSF wizard to estimate these populations. As I increase the number of peaks, the R^2 value will increase because I am better able to match the data set. However as I increase the number of peaks, the potential error in each curve increases. (Typically I need 2-4 curves.)

I was wondering if anybody knows of a way to quantify this, and achieve the best combination of the two.

Many thanks

Ben
6   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 10/07/2005 : 10:51:20 AM
Hi Ben,

Regarding the issue of initialization for the first peak, when you first start with one peak, the entire dataset is being used by the NLSF code to come up with initial parameter estimates for this first peak. That may be causing the estimates to be off?

As for coding this, basically you need to utilize the NLSF object and its various methods and properties. These are documented in the LabTalk language reference manual in the Programming help file. I do not know of any code for this specific application that exists right now.

Easwar
OriginLab


b.harris Posted - 10/07/2005 : 12:02:56 AM
Hi Easwar,

Many thanks for your help.

quote:
I presume you are performing the fit manually? So you first fit with one peak, then change replica to 1 and fit, then change replica to 2 and fit etc?


That's correct


quote:
if you add another peak by increasing the number of replicas, the parameters obtained from the previous fit should be left unchanged for all the previous peaks


This is correct for all but the first peak. Given that I have a large number of data sets, to which I want to fit multiple successive peaks I was hoping to avoid manual entry of the peaks back into the NLSF tool. Is there another reason why the first peak wouldn't be initialised correctly?


quote:
Also, if you know apriori where the peaks should be located in the data, and you know what are the rough parameter values to use for the peaks (some initial estimate), then you may want to consider automating this using Origin C programming.


Given that the start point of the additional peak are the parameters of the last peak added (which seems to be the default of the NLSF tool), I gather this should be easily automated. However my programming skills are very limited (virtually non-existent) - do you know of any existing code that exists for this? I came across Mike Buess' multifit code, which looks like a good start, but unfortunately I don't have the knowledge to be able to edit this?

Many thanks

Ben
easwar Posted - 10/06/2005 : 09:10:48 AM
quote:

Can I determine the start point of each successive lognormal fit??



Hi Ben,

I presume you are performing the fit manually? So you first fit with one peak, then change replica to 1 and fit, then change replica to 2 and fit etc?

At the end of a fit, when you click the Done button on the Fitting page of the NLSF tool, the results are sent to results log (plus you can get more fit results such as SSR using the Action->Results page and the Parameter Worksheet button).

At this point, after clicking the Done button, if you add another peak by increasing the number of replicas, the parameters obtained from the previous fit should be left unchanged for all the previous peaks. Parameters for one more peak will be added, and you can go change those to specify where the new peak is located etc.

The above does not work for you?

Also, if you know apriori where the peaks should be located in the data, and you know what are the rough parameter values to use for the peaks (some initial estimate), then you may want to consider automating this using Origin C programming. That may be less tedious than having to manually increase replicas and fit manually each time.

Easwar
OriginLab



Edited by - easwar on 10/06/2005 09:12:45 AM
b.harris Posted - 10/06/2005 : 03:04:59 AM
As another question,

By using the Adnvanced curve fitting tool for fitting multiple non linear curves, is there any way of setting the start point for each successive curve fit.

That is: After fitting one log normal curve to the data, I want to fit 2 lognormal curves and compare the fit (Using the Akaike information criterion). Once I have done 2 - then try 3. And so on.... Can I determine the start point of each successive lognormal fit??

Many thanks

Ben
b.harris Posted - 10/06/2005 : 02:58:39 AM
Thanks for that Leo,

I agree that it depends on the nature of the data. The major problem is that there are theoretically infinite compartments to the data.

After a bit of research, I have started using the Aikake Information citerion as a determination of "the number of compartments for a model".

Very useful

Ben
Leo_Li Posted - 09/30/2005 : 06:36:12 AM
Hello Ben,

My idea is that the decision shall strongly depend on the nature of your data. For example, how many factors contribute to you populations, or how many peaks can be extracted (including hidden peaks) from the overall profile of your data etc. In principle, Origin fit the curve mathematically. The physical explanation of every peak is up to you.

Leo


The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000