问题:
我正在尝试使用 Duncan 分组进行方差分析。但是,结果窗口仅显示颜色代码(右)而不是字母代码(左)。如何将结果转换为字母代码?
解答:
示例地址
https://v8doc.sas.com/sashtml/stat/chap17/sect26.htm
title 'Nitrogen Content of Red Clover Plants'; data Clover; input Strain $ Nitrogen @@; datalines; 3DOK1 19.4 3DOK1 32.6 3DOK1 27.0 3DOK1 32.1 3DOK1 33.0 3DOK5 17.7 3DOK5 24.8 3DOK5 27.9 3DOK5 25.2 3DOK5 24.3 3DOK4 17.0 3DOK4 19.4 3DOK4 9.1 3DOK4 11.9 3DOK4 15.8 3DOK7 20.7 3DOK7 21.0 3DOK7 20.5 3DOK7 18.8 3DOK7 18.6 3DOK13 14.3 3DOK13 14.4 3DOK13 11.8 3DOK13 11.6 3DOK13 14.2 COMPOS 17.3 COMPOS 19.4 COMPOS 19.1 COMPOS 16.9 COMPOS 20.8 ; proc anova; class Strain; model Nitrogen = Strain; means Strain / duncan waller; run;
Waller-Duncan k-ratio t 检验的结果显示如下:
修改代码如下,添加LINESTABLE选项
LINES 通过按降序列出均值并按线段指示不显著的子集来显示选项的结果
LINESTABLE 以表格形式显示 LINES 选项的结果
代码
title 'Nitrogen Content of Red Clover Plants';
data Clover;
input Strain $ Nitrogen @@;
datalines;
3DOK1 19.4 3DOK1 32.6 3DOK1 27.0 3DOK1 32.1 3DOK1 33.0
3DOK5 17.7 3DOK5 24.8 3DOK5 27.9 3DOK5 25.2 3DOK5 24.3
3DOK4 17.0 3DOK4 19.4 3DOK4 9.1 3DOK4 11.9 3DOK4 15.8
3DOK7 20.7 3DOK7 21.0 3DOK7 20.5 3DOK7 18.8 3DOK7 18.6
3DOK13 14.3 3DOK13 14.4 3DOK13 11.8 3DOK13 11.6 3DOK13 14.2
COMPOS 17.3 COMPOS 19.4 COMPOS 19.1 COMPOS 16.9 COMPOS 20.8
;
proc anova;
class Strain;
model Nitrogen = Strain;
means Strain / duncan waller LINESTABLE;
run;
结果如下: