Bland-Altman分析是验证两种旨在测量相同参数的方法之间的一致程度或不一致的过程.方法之间的高度相关性表明在数据分析中选择了足够好的样本.在SAS中,我们通过计算变量值的平均值,上限和下限来创建Bland-Altman图.然后我们使用
PROC SGPLOT来创建Bland-Altman图.
在SAS中应用PROC SGPLOT的基本语法是 :
PROC SGPLOT DATA = dataset; SCATTER X = variable Y = Variable; REFLINE value;
以下是所用参数的说明及减号;
数据集是数据集的名称.
SCATTER 语句调整散点图以X和Y形式提供的值的图表.
REFLINE 创建水平或垂直参考线.
在下面的示例中,我们采用两个名为new和old的方法生成的两个实验的结果.我们计算变量值的差异以及同一观察的变量的平均值.我们还计算了在计算的上限和下限中使用的标准偏差值.
结果显示Bland-Altman图作为散点图.
data mydata; input new old; datalines; 31 45 27 12 11 37 36 25 14 8 27 15 3 11 62 42 38 35 20 9 35 54 62 67 48 25 77 64 45 53 32 42 16 19 15 27 22 9 8 38 24 16 59 25 ; data diffs ; set mydata ; /* calculate the difference */ diff = new-old ; /* calculate the average */ mean = (new+old)/2 ; run ; proc print data = diffs; run; proc sql noprint ; select mean(diff)-2*std(diff), mean(diff)+2*std(diff) into :lower, :upper from diffs ; quit; proc sgplot data = diffs ; scatter x = mean y = diff; refline 0 &upper &lower / LABEL = ("zero bias line" "95% upper limit" "95% lower limit"); TITLE 'Bland-Altman Plot'; footnote 'Accurate prediction with 10% homogeneous error'; run ; quit ;
执行上述代码后,我们得到以下结果 :
在上述程序的增强模型中,我们得到95%置信度曲线拟合.
proc sgplot data = diffs ; reg x = new y = diff/clm clmtransparency = .5; needle x = new y = diff/baseline = 0; refline 0 / LABEL = ('No diff line'); TITLE 'Enhanced Bland-Altman Plot'; footnote 'Accurate prediction with 10% homogeneous error'; run ; quit ;
执行上述代码后,我们得到以下结果 :