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
yaroslaw
Level I

Possible to extract longitudinal confidence interval bounds from degradation stability test?

My team frequently uses the Degradation Stability Test analysis to determine the predicted (95% confidence) values and upper and lower bounds for a response (y value). At this point we've been running the degradation stability test for each y variable (same series of x time point values) and then manually changing the longitudinal prediction time, saving the predictions into a new data window and then extracting the predicted, upper, and lower bound values into a separate Excel file. I'm trying to write a script that can run the stability test for a number of pre-selected longitudinal prediction time points and save all of the data (predicted value, upper, and lower bound values) into a new data table. However, I keep running into errors and I'm not sure whether what I'm trying to achieve is possible in the current version of JMP (v17.1.1). I've attached my script below.

// Use the current data table
dt = Current Data Table();

// Define the longitudinal prediction times
longitudinalPredictionTimes = {18, 24, 36, 48, 60};

// Create a new data table to store the results
resultsTable = New Table( "Prediction Results",
Add Rows( N Items( longitudinalPredictionTimes ) ),
New Column( "Prediction Time", Numeric, "Continuous" ),
New Column( "Prediction", Numeric, "Continuous" ),
New Column( "Lower Bound", Numeric, "Continuous" ),
New Column( "Upper Bound", Numeric, "Continuous" )
);

// Loop through each prediction time and perform the degradation analysis
For( i = 1, i <= N Items( longitudinalPredictionTimes ), i++,
predictionTime = longitudinalPredictionTimes[i];

// Perform degradation analysis
degradationReport = dt << Degradation(
Y( :"Purity (%)" ),
Time( :"Timepoint (days)" ),
Label( :Formulation ),
Application( Stability Test ),
Connect Data Markers( 0 ),
Show Fitted Lines( 1 ),
Show Spec Limits( 1 ),
Show Median Curves( 0 ),
Show Legend( 1 ),
No Tab List( 0 ),
Use Pooled MSE for Nonpoolable Model( 0 ),
Set Censoring Time( . ),
Show Residual Plot( 1 ),
Show Inverse Prediction Plot( 1 ),
Show Curve Interval( 1 ),
Longitudinal Prediction Time( predictionTime ),
Longitudinal Prediction Interval( Confidence Interval ),
Longitudinal Prediction Alpha( 0.05 ),
Inverse Prediction Interval( Confidence Interval ),
Inverse Prediction Alpha( 0.05 ),
Inverse Prediction Side( Lower One Sided )
);

// Extract the prediction, lower bound, and upper bound from the report
predictionPlot = degradationReport[Outline Box( "Diagnostics and Predictions" )][Outline Box( "Prediction Plot" )];
prediction = predictionPlot[Number Col Box( "Predicted value of Purity (%) at Timepoint (days)=" || Char( predictionTime ) )][1];
lowerBound = predictionPlot[Number Col Box( "Lower 95% Confidence Limit" )][1];
upperBound = predictionPlot[Number Col Box( "Upper 95% Confidence Limit" )][1];

// Add the results to the new table
resultsTable:Prediction Time[i] = predictionTime;
resultsTable:Prediction[i] = prediction;
resultsTable:Lower Bound[i] = lowerBound;
resultsTable:Upper Bound[i] = upperBound;
);

// Show the results table
resultsTable << Show Window
2 REPLIES 2
peng_liu
Staff

Re: Possible to extract longitudinal confidence interval bounds from degradation stability test?

I believe there are some programming errors.

Following is probably what you need to do.

peng_liu_0-1725657121860.png

First on Line 59, you need a "report" call, wrapping around the object returned from platform calling. This "report" gives you a display true, which you can navigate using outline box subscription, etc.

On Line 60, it returns a scriptable object, to which you can send commands that you see in the drop down menu. Such as this:

peng_liu_1-1725657293247.png

Line 61, send such a command, as if you clicked the menu item.

Line 62, you do something with the numbers that you need.

Last, you close that data table without saving anything, because you have done with it.

 

yaroslaw
Level I

Re: Possible to extract longitudinal confidence interval bounds from degradation stability test?

I've since found a workaround that calculates the 95% confidence interval values using the bivariate function.