cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar

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: 

MikeDereviankin_0-1643839065096.png

MikeDereviankin_1-1643839075099.png

 

M. Dereviankin
1 ACCEPTED SOLUTION

Accepted Solutions
peng_liu
Staff

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.

peng_liu_0-1643861613933.png

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:

peng_liu_1-1643861734038.png

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.

peng_liu_2-1643861955173.png

Click Go button in the report, then you get the result.

peng_liu_3-1643862005337.png

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.

peng_liu_4-1643862293315.png

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.

peng_liu_5-1643862444261.png

Then click "Fit Model".

peng_liu_6-1643862510678.png

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.

 

View solution in original post

5 REPLIES 5
peng_liu
Staff

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.

peng_liu_0-1643861613933.png

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:

peng_liu_1-1643861734038.png

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.

peng_liu_2-1643861955173.png

Click Go button in the report, then you get the result.

peng_liu_3-1643862005337.png

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.

peng_liu_4-1643862293315.png

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.

peng_liu_5-1643862444261.png

Then click "Fit Model".

peng_liu_6-1643862510678.png

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.

 

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? 

M. Dereviankin
peng_liu
Staff

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.

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.

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:

 

Screen Shot 2022-02-03 at 9.17.38 AM.png

 

I obtained this fit:

 

Screen Shot 2022-02-03 at 9.17.57 AM.png

 

@peng_liu's solution is also available as one of the models available in Fit Curve.

 

Screen Shot 2022-02-03 at 9.30.53 AM.png

 

So you have a lot of flexibility in how you model your data.