我遇到了一些問題,當嘗試提取線性擬合參數時,我不斷收到錯誤。
我有一個標準的 YvsX 數據集,但有 4 個不同的“分組依據”列。 當我嘗試進行提取時(我嘗試了很多不同的方法),我不斷收到如下錯誤:
知道這是怎麼回事嗎? 我嘗試將四個列連接到一個列中,然後按該單個連接進行拆分,但仍然會出現錯誤。
//make report
biv = Bivariate(
Y( :Y ),
X( :X ),
By( :A, :B, :C, :D</img> ),
Fit Line( {Line Color( "Red" )} )
);
//list the reports
rbiv = biv << report;
//count the number of reports
nBy = N Items( rbiv );
//array of as many rows as reports. 1col, all set to zero.
vc = J( nBy, 1, 0 );
//Create output table and fill with estimates
dtOut = New Table( "Regression parameters",
New Column( "Group", Character ),
New Column( "Intercept", numeric ),
New Column( "Slope", numeric ),
addrows( nBy ));
//grab the values
For( j = 1, j <= nBy, j++,
Estimates = rbiv[j]["Linear Fit"]["Parameter Estimates"][1][3] << get as matrix;
:Group[j] = groups[j];
:Intercept[j] = Estimates[1];
:Slope[j] = Estimates[2]);



使用“創建組合數據表”可能比導航報表圖層更容易。

使用 Big Class.jmp 並通過 X 擬合 Y 並進行如下選擇:

為我提供輸出:

當我右鍵單擊參數估計內的錶框並選擇“製作組合數據表”時,我得到下表:

從那裡我可以刪除我不感興趣的所有行和列。
您還可以從表腳本中獲取腳本
