我的團隊經常使用降解穩定性測試分析來確定預測(95% 置信度)值以及反應的上限和下限(y 值)。此時,我們已經對每個y 變數(同一系列的x 時間點值)運行了退化穩定性測試,然後手動更改縱向預測時間,將預測保存到新的資料視窗中,然後提取預測的上、上、下資料。我正在嘗試編寫一個腳本,可以對多個預先選擇的縱向預測時間點運行穩定性測試,並將所有資料(預測值、上限和下限值)保存到新的資料表中。但是,我不斷遇到錯誤,並且不確定我想要實現的目標是否在當前版本的 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 行,您需要一個「report」調用,包裝從平台調用返回的物件。此「報告」為您提供顯示真實,您可以使用大綱框訂閱等進行導航。
在第 60 行,它會傳回一個可編寫腳本的對象,您可以向該對象發送在下拉式選單中看到的命令。比如這樣:

第61行,發送這樣一個指令,就好像你點擊了選單項目一樣。
第 62 行,你用你需要的數字做一些事情。
最後,您關閉該數據表而不保存任何內容,因為您已經完成了它。
此後我找到了一種解決方法,可以使用二元函數計算 95% 置信區間值。