我的团队经常使用退化稳定性测试分析来确定响应(y 值)的预测值(95% 置信度)和上限和下限。此时,我们已经对每个 y 变量(同一系列的 x 时间点值)运行退化稳定性测试,然后手动更改纵向预测时间,将预测保存到新的数据窗口中,然后将预测值、上限和下限值提取到单独的 Excel 文件中。我正在尝试编写一个脚本,可以对多个预先选择的纵向预测时间点运行稳定性测试,并将所有数据(预测值、上限和下限值)保存到新的数据表中。但是,我一直遇到错误,我不确定在当前版本的 JMP(v17.1.1)中是否可以实现我想要实现的目标。我已将我的脚本附在下面。
// 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我相信存在一些编程错误。
以下可能就是您需要做的。

首先在第 59 行,您需要一个“报告”调用,它环绕着平台调用返回的对象。此“报告”为您提供了一个显示 true,您可以使用轮廓框订阅等进行导航。
在第 60 行,它返回一个可编写脚本的对象,您可以向其发送下拉菜单中看到的命令。例如:

第61行,发送这样的命令,就好像你点击了菜单项一样。
第 62 行,您对所需的数字进行一些操作。
最后,关闭该数据表而不保存任何内容,因为您已经完成它了。
从那时起,我找到了一种解决方法,使用双变量函数计算 95% 置信区间值。