- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Determining Half Lives
Hello,
I have monitoring chemical concentrations (y response) with time. I'm looking to predict temporal changes in these concentrations and assuming that the chemical concentration follows a first-order exponential decay. What I am looking to do is predict what the half life is for the chemical of interest.
How do I use the non-linear model or degradation model to predict what the half life will be? I cannot impute the half life formula as I don't have all the variables to solve it. Are there any examples in that I can build of this?
The formulas are attached within here:
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Determining Half Lives
This is what I think what you have: a series of time values and associated concentration readings. You want to see how to fit the model.
The two screenshots and what you said "first-order exponential decay" all point to one model: Exponential.
The regression formula is: Y = A * Exp( -K * Time), where K is the reaction rate constant. Mark this Model A.
This is the integrated form of ODE form in your second screenshot. Lamda is K above.
You can see the formula in your first screenshot is the same thing. Take logarithm on both side, and notice half life t_[1/2] = log(2)/K. Then you have Log N = Log N[0] - K * Time, which is the exponential curve draws on a log-linear scale, so it looks like a linear regression. Mark this Model B.
It depends on the data, whether Model A or Model B is more appropriate, if you fit a nonlinear regression using Model A or fit a linear regression using Model B. I.e. whether the assumption of constant variance residuals holds.
The attached table shows how to fit Model A using Nonlinear and Degradation. Data is simulated.
To use Nonlinear, you need to create a prediction formula column, like the last one in the table. The formula is a Parameter JSL function:
Read Example of the Nonlinear Platform to see how to create such a formula step by step.
Then you configure the launch dialog like this, then click OK.
Click Go button in the report, then you get the result.
Nonlinear platform is an extremely versatile platform for solving customized nonlinear least square, and maximum likelihood problems, and even arbitrary optimization problems. Put some time on it and master it. You won't regret.
To use Degradation, you need to create a dummy ID column, filled with the same value. I am assuming that you only have one trace of concentration readings.
Configure the launch dialog like this, then hit OK.
From the report menu, choose "Nonlinear Path" under "Degradation Path Style".
Fill in the prediction formula as a piece of JSL, give it a name (I call it "model"), click "Use & Save". What you entered is technically the same as what you entered to create the last prediction column used in Nonlinear. As you learn more, you should recognize what in the curly brackets are parameters and their initial values. followed by the definition of your formula, and both of them are wrapped around inside of a Parameter call.
Then click "Fit Model".
If your model does not fit, try to tweak the initial values, then click "Use & Save", followed by "Fit Model".
Finally, click "Generate Report for Current Model" to produce the final report.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Determining Half Lives
This is what I think what you have: a series of time values and associated concentration readings. You want to see how to fit the model.
The two screenshots and what you said "first-order exponential decay" all point to one model: Exponential.
The regression formula is: Y = A * Exp( -K * Time), where K is the reaction rate constant. Mark this Model A.
This is the integrated form of ODE form in your second screenshot. Lamda is K above.
You can see the formula in your first screenshot is the same thing. Take logarithm on both side, and notice half life t_[1/2] = log(2)/K. Then you have Log N = Log N[0] - K * Time, which is the exponential curve draws on a log-linear scale, so it looks like a linear regression. Mark this Model B.
It depends on the data, whether Model A or Model B is more appropriate, if you fit a nonlinear regression using Model A or fit a linear regression using Model B. I.e. whether the assumption of constant variance residuals holds.
The attached table shows how to fit Model A using Nonlinear and Degradation. Data is simulated.
To use Nonlinear, you need to create a prediction formula column, like the last one in the table. The formula is a Parameter JSL function:
Read Example of the Nonlinear Platform to see how to create such a formula step by step.
Then you configure the launch dialog like this, then click OK.
Click Go button in the report, then you get the result.
Nonlinear platform is an extremely versatile platform for solving customized nonlinear least square, and maximum likelihood problems, and even arbitrary optimization problems. Put some time on it and master it. You won't regret.
To use Degradation, you need to create a dummy ID column, filled with the same value. I am assuming that you only have one trace of concentration readings.
Configure the launch dialog like this, then hit OK.
From the report menu, choose "Nonlinear Path" under "Degradation Path Style".
Fill in the prediction formula as a piece of JSL, give it a name (I call it "model"), click "Use & Save". What you entered is technically the same as what you entered to create the last prediction column used in Nonlinear. As you learn more, you should recognize what in the curly brackets are parameters and their initial values. followed by the definition of your formula, and both of them are wrapped around inside of a Parameter call.
Then click "Fit Model".
If your model does not fit, try to tweak the initial values, then click "Use & Save", followed by "Fit Model".
Finally, click "Generate Report for Current Model" to produce the final report.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Determining Half Lives
This worked out great for my use case!
What about if I had no prior knowledge of the function that best describes the breakdown? How could I run a bunch of different models and determine which equation fits best?
What if I had a scenario where the initial concentration was a defined amont and I couldn't modify this number?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Determining Half Lives
If you are searching to see what can fit your data, then the entire software is your hunting ground. There are so many ways to see what your data is telling.
You may want to check out two hot spots though. @Mark_Bailey has already pointed out one, the Fit Curve platform. Meanwhile, Nonlinear platform has a built-in library: Create a Formula Using the Model Library
In the end, don't forget to ask yourself: is that all? Your model may not be among what you found.
If some parameters are fixed, both Nonlinear and Degradation allow you to fix them. Look for the check boxes by the side of parameters. Or you can even hard code your value in the formula, if that works for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Determining Half Lives
You can use the Analyze > Predictive Modeling > Model Comparison platform in JMP Pro to evaluate all your models if you save them as column formulas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Determining Half Lives
I wonder if using the original parameterization would help the interpretation. Specifically the direct estimation of the half life. I used this formula for the non-linear model:
I obtained this fit:
@peng_liu's solution is also available as one of the models available in Fit Curve.
So you have a lot of flexibility in how you model your data.