cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar

How do I use the integrate function with a predictive formula generated from a raw data set

Hello!

I'm attempting to find the area under a curve of a data set between specific time intervals (x-axis). I have taken the raw data which was analyte concentration (y) across time (x) and ran it through a fit curve model that generated a predicted equation that fits the raw data with R^2 =0.95.

I'm a bit confused of my next step, I've tried to plug the equation in as a formula in a new column and insert the time column where ever there was an X in the equation but it basically is just is replotting the same exact Y-values of the raw data. I then tried to use the integrate function in a new column entered like this in the formula with Integrate(column with model equation, Time, 0, 10). It's basically just 10xing the column values, I'm sure this isn't quite right. Would any one be able to provide me with some help on the best way to find the area under the curve or maybe use the integrate function properly? The fit predictive model I used was a quadratic.

Taking another look if I use Guassian Peak model I still get an R^2 = 0.95 and if I right click the red triangle I can generate the area under the curve. For some reason this isn't an option when I right click the red triangle for the quadratic model. I'm using JMP 17 on PC thank you.

BimodalTrees188_0-1702513208009.png

 




1 REPLY 1
Craige_Hales
Super User

Re: How do I use the integrate function with a predictive formula generated from a raw data set

Integrate(), Interpolate(), and SplineEval()  might be part of what you are looking for. I think you can use the prediction equation directly with the integrate function; you shouldn't need interpolation or splines if you have f(x) already.

 

I think the problem is that you are sending a column to the integrate function for the first parameter but you need to send the prediction formula. So instead of

Integrate(column with model equation, Time, 0, 10)

something like

Integrate(42+3*Time^2 + 5*Time, Time, 0, 10)

which you might copy from the column's formula.

 

Possibly something like this will work to avoid a manual copy:

e=pred<<getformula; // get the prediction column formula (pred is probably "column with model equation")
substituteinto(e,expr(:time),expr(xxx)); // replace the time column reference with a dummy xxx
integrate(e,xxx,1,10); // use the dummy xxx in place of time
Craige