我有一个拉丁方,有各种治疗方法 A、B、C、D。我想知道最有效的方法,即价值更大的治疗方法。
data<-c(13.7,10.8,15.3,19.1,12.1,19.2,15.4,13.6,11.9,14.6,17.1,18.7,14.2,16.3,11.4,16.9)
treat<-c("B","D","C","A","C","A","D","B","A","C","B","D","D","B","A","C")
row <- factor(rep(1:4, 4))
col <- factor(rep(1:4, each = 4))
mat<-data.frame(row,col,data)
mat
# row col treat data
# 1 1 1 B 13.7
# 2 2 1 D 10.8
# 3 3 1 C 15.3
# 4 4 1 A 19.1
# 5 1 2 C 12.1
# 6 2 2 A 19.2
# 7 3 2 D 15.4
# 8 4 2 B 13.6
# 9 1 3 A 11.9
# 10 2 3 C 14.6
# 11 3 3 B 17.1
# 12 4 3 D 18.7
# 13 1 4 D 14.2
# 14 2 4 B 16.3
# 15 3 4 A 11.4
# 16 4 4 C 16.9