Sas 敏感性和特异性

Sas 敏感性和特异性,sas,Sas,我需要为我的数据集计算以下内容。我可以计算单个PPV(95%CI)和NPV(95%CI),但对如何计算这一点有些困惑: PPV+NPV-1(95%置信区间) 如何进行此计算?给出如下代码: title 'Sensitivity'; proc freq data=FatComp; where Response=1; weight Count; tables Test / binomial(level="1"); e

我需要为我的数据集计算以下内容。我可以计算单个PPV(95%CI)和NPV(95%CI),但对如何计算这一点有些困惑:

PPV+NPV-1(95%置信区间)

如何进行此计算?

给出如下代码:

title 'Sensitivity';
      proc freq data=FatComp;
         where Response=1;
         weight Count;
         tables Test / binomial(level="1");
         exact binomial;
         run;

      title 'Specificity';
      proc freq data=FatComp;
         where Response=0;
         weight Count;
         tables Test / binomial(level="0");
         exact binomial;
         run;

      title 'Positive predictive value';
      proc freq data=FatComp;
         where Test=1;
         weight Count;
         tables Response / binomial(level="1");
         exact binomial;
         run;

      title 'Negative predictive value';
      proc freq data=FatComp;
         where Test=0;
         weight Count;
         tables Response / binomial(level="0");
         exact binomial;
         run;

我怀疑这是一项有用的措施。一般来说,您应该提供敏感性、特异性、阳性和阴性预测值。如果你想要一个全局的准确度衡量标准,你应该选择正确分类的主题的比例

如果你进入Peter Flom已经建议的页面,你可以滚动到一段代码,以保证整体的准确性。通过创建一个二进制变量来计算精度,该变量指示测试和响应在每次观察中是否一致:

data acc; 
     set FatComp;
     if (test and response) or 
        (not test and not response) then acc=1; 
     else acc=0;
     run;
  proc freq;
     weight count;
     tables acc / binomial(level="1");
     exact binomial;
     run;
希望能有帮助