如何在 JMP 中執行 2 樣本 Hotelling 的 T 方檢定?我正在嘗試比較多個不同的產品規格或變數 (k = 8) 2 個不同組別之間。 我現在無法找到一種方法來使用 2 樣本 Hotelling 的 T 方檢定在 JMP 中輕鬆比較兩組之間的多個因素。 我還想知道如果我們拒絕 Hotelling 的 T2 檢定統計量並查看剖面圖,JMP 是否可以建立 CI?
基礎資料分析與建模回覆:如何在 JMP 中執行 2 樣本 Hotelling 的 T 方檢定?我在網路上找到了一些執行 2 Sample Hotelling T2 計算的 SAS 程式碼。我將代碼轉換為 JSL。我根據一些示例數據對其進行了測試,結果顯示正常。雖然有點笨重,但確實有效。查看 JSL 中的註釋,以了解需要設定哪些內容才能處理您的資料。

Names Default To Here( 1 );
// Open the data table
dt = open("$SAMPLE_DATA/Prostate Cancer.jmp");
groupVar = "Status"; // Enter the grouping column name
groupList = {"CCD", "Nor"}; // Set the values for the 2 groups
startColumn = 660; // Set the starting column number for the data to be included
// Create the group 1 and group 2 matrices for analysis
gp1Rows = dt << get rows where( as column( groupVar) == groupList[1] );
group1 = dt[gp1Rows, startColumn :: N Cols( dt )];
gp1Rows = dt << get rows where( as column( groupVar ) == groupList[2] );
group2 = dt[gp1Rows, startColumn :: N Cols( dt )];
// Get the dimensions of the matricies
nRows1 = N Row( group1 );
nRows2 = N Row( group2 );
numCols = N Col( group1 );
// Create a filled vector for the analysis
j1 = J( nRows1, 1, 1 );
j2 = J( nRows2, 1, 1 );
// Create an identity matrix for each group
identity1 = Identity( nRows1 );
identity2 = Identity( nRows2 );
// Calculate the means for each of the columns by each group
MeanY1 = group1` * j1 / nRows1;
MeanY2 = group2` * j2 / nRows2;
// Create an output window to display the results in
nw = New Window("Hotelling T2", outlinebox("Hotelling 2 Sample T2 Analysis",spacerbox(size(1,15)),lub = vlistbox()));
// Add the means table to the output
obMean = Outline Box("Group Means",
mTB = Table Box(
string Col box("Groups", groupList),
number col box("# Rows", matrix(nRows1)||matrix(nRows2))
)
);
for(i=startColumn, i<=NCols(dt),i++,
mTB << append(number col box(column(dt,i)<<GET name=""></GET>
回覆:如何在 JMP 中執行 2 樣本 Hotelling 的 T 方檢定?感謝您的答覆。 我沒想過嘗試使用 SAS 尋找解決方案。現在我想起來,我可能有 SAS 程式碼,用於在 2 個組別之間進行多變量比較,這也可能有效。 也就是說,我希望有人知道:分析 > 擬合模型選單 > Manova 是否可以僅對 2 個組而不是多個組進行多變量比較?
回覆:如何在 JMP 中執行 2 樣本 Hotelling 的 T 方檢定?來自 JMP 幫助:

回覆:如何在 JMP 中執行 2 樣本 Hotelling 的 T 方檢定?謝謝馬克。 我在多變量選單下看到了 1 樣本 T2 測試選項,但找不到 2 樣本測試的任何內容 - 這就是我正在尋找的用於比較 2 組之間產品規格的內容。 我想我可以使用 MANOVA 選項,但使用 2 個組而不是通常需要的 3 個以上組,看看是否可以獲得正確的輸出。
回覆:如何在 JMP 中執行 2 樣本 Hotelling 的 T 方檢定?對於有興趣的人 - 我認為(有人可能需要驗證)您可以使用 MANOVA 選項來執行 2 樣本 Hotelling 的 T2 分析,如下所示:
- 分析> 擬合模型> 選擇您嘗試在2 個組之間進行比較的所有響應變量並將它們移至“Y”,選擇包含2 個組標籤的列,選擇“構建模型效應”下的“添加” > 選擇「從「個性」下拉式選單 > 執行 > 在「選擇回應」功能表下,選擇「身分」> 運行。
- 這應該會輸出您的測試的 F 值和機率。
- 我不知道如何從這裡進行同步或 Bonferroni 調整間隔。
回覆:如何在 JMP 中執行 2 樣本 Hotelling 的 T 方檢定?親愛的吉姆
我可以說服你也發布 SAS 程式碼嗎?那將是最有幫助的。
謝謝
回覆:如何在 JMP 中執行雙樣本 Hotelling T 方檢定?這是 SAS 範例的連結。我相信這是我使用的例子,但我不確定。
7.1.15 - 雙樣本Hotelling T方檢定統計量| STAT 505(psu.edu)