我有4个统计数据,例如:体重,身高,体温,纯度。我想为他们申请t ^ 2酒店。 首先,如果我运行,是这样吗?
HotellingsT2(MatrixOfVariables)matrix(c(weight, height, temp, purity),nrow=4,ncol=1)
要获得这些统计数据的t ^ 2 hotelling检验?
第二,输出获取t ^ 2 hotelling测试的所有元素。如果我只想从HotellingsT2(X,...)获取“ t ^ 2 hotelling统计量”,我该怎么办? ? (我的意思是我只想得到3.7648的输出。)
MatrixOfVariables <-matrix(c(weight, height, temp, purity),nrow=4,ncol=1)
output <- HotellingsT2(MatrixOfVariables)
output
#Hotelling's one sample T2-test
data: MatrixOfVariables
T.2 = 3.7648, df1 = 1, df2 = 3, p-value = 0.1477
alternative hypothesis: true location is not equal to c(0)