#correlation of texture
setwd("C:/Users/jack/Desktop/mission/correlation/texture")
library(readxl)
T2WI <- read_excel("Crosswise_Texture features and histological features.xlsx",
sheet = "T2WI")
SWI <- read_excel("Crosswise_Texture features and histological features.xlsx",
sheet = "SWI")
T2star <- read_excel("Crosswise_Texture features and histological features.xlsx",
sheet = "T2star")
score <- read_excel("Crosswise_Texture features and histological features.xlsx",
sheet = "score")
##1、比较五组间差异(非参数方差分析),将有差异的纹理特征筛选出来#Kurskal-Wallis检验是Wilcoxon方法(其实是Mann-Whitney检验)用于多个样本。当对两个样本进行比较的时候,Kurskal-Wallis检验与Mann-Whitney检验是等价的。
#T2WI
T2WI_selected<-c()
T2WI_feature<-T2WI[,-c(1,2)]
for (feature in names(T2WI_feature)){
result_temp <- kruskal.test(T2WI[[feature]]~T2WI$Group)
if (result_temp$p.value<0.05) {
T2WI_selected<-c(T2WI_selected,feature)
}
}
#SWI
SWI_selected<-c()
SWI_feature<-SWI[,-c(1,2)]
for (feature in names(SWI_feature)){
result_temp <- kruskal.test(SWI[[feature]]~SWI$Group)
if (result_temp$p.value<0.05) {
SWI_sele