<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get CI for Sensitivity, Specificity, PPV, NPV, and accuracy using TP, TN, FN, FP directly in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-CI-for-Sensitivity-Specificity-PPV-NPV-and-accuracy/m-p/951362#M47571</link>
    <description>&lt;P&gt;Those are the 4 cell count values used to create the FatComp data set in &lt;A href="http://support.sas.com/kb/24170" target="_self"&gt;this note&lt;/A&gt; which illustrates, in various ways, how those and other statistics can be computed. So, you could use the same approach to create a data set with your cell counts and then use the SENSPEC option in PROC FREQ, as shown, to compute four of the statistics you want. Those statistics, and all of the other ones discussed in the note (including accuracy) can be computed as shown using PROC NLMIXED. Yet another method for computing accuracy is also shown.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Nov 2024 16:37:52 GMT</pubDate>
    <dc:creator>StatDave</dc:creator>
    <dc:date>2024-11-20T16:37:52Z</dc:date>
    <item>
      <title>How to get CI for Sensitivity, Specificity, PPV, NPV, and accuracy using TP, TN, FN, FP directly?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-CI-for-Sensitivity-Specificity-PPV-NPV-and-accuracy/m-p/951355#M47570</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;I have a dataset including 4 columns as (TP, TN, FP, and FN), which means the researcher identified these metrics based on their clinical knowledge. Based on this, I can calculate sen, spe, PPV, NPV, accuracy, etc directly using the&amp;nbsp; code below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table tmp1 as select&lt;BR /&gt; sum(TP) as TP, sum(TN) as TN, sum(FP) as FP,
sum(FN) as FN, sum(tntp) as tntp, sum(fnfp) as fnfp 
from tmp; quit;

proc sql;
create table tmp2 as select&lt;BR /&gt; TP/(TP+FN) as sensitivity, TN/(TN+FP)as specificity, 
TP/(TP+FP) as PPV, TN / (TN+FN) as NPV, (tn+tp)/(tn+tp+fn+fp) as accuracy
from tmp1; quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I think there is another way to get these metrics using proc freq, but not sure how to sort out as I don't have the column as an actual values to include "actual*predicted" in proc freq.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please help me to figure out what is the SAS code to get the Confidence Interval for all the metrics, sen, spe, PPV,NPV, accuracy, etc&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 16:12:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-CI-for-Sensitivity-Specificity-PPV-NPV-and-accuracy/m-p/951355#M47570</guid>
      <dc:creator>bhr-q</dc:creator>
      <dc:date>2024-11-20T16:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get CI for Sensitivity, Specificity, PPV, NPV, and accuracy using TP, TN, FN, FP directly</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-CI-for-Sensitivity-Specificity-PPV-NPV-and-accuracy/m-p/951362#M47571</link>
      <description>&lt;P&gt;Those are the 4 cell count values used to create the FatComp data set in &lt;A href="http://support.sas.com/kb/24170" target="_self"&gt;this note&lt;/A&gt; which illustrates, in various ways, how those and other statistics can be computed. So, you could use the same approach to create a data set with your cell counts and then use the SENSPEC option in PROC FREQ, as shown, to compute four of the statistics you want. Those statistics, and all of the other ones discussed in the note (including accuracy) can be computed as shown using PROC NLMIXED. Yet another method for computing accuracy is also shown.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 16:37:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-CI-for-Sensitivity-Specificity-PPV-NPV-and-accuracy/m-p/951362#M47571</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2024-11-20T16:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to get CI for Sensitivity, Specificity, PPV, NPV, and accuracy using TP, TN, FN, FP directly</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-CI-for-Sensitivity-Specificity-PPV-NPV-and-accuracy/m-p/951365#M47572</link>
      <description>&lt;P&gt;Thank you for your answer, I am familiar with this note, my issue is as I have four columns like below, I am not sure how to sort it out in proc freq&lt;/P&gt;
&lt;P&gt;TP TN FP FN&lt;BR /&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;. &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;.&amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;.&amp;nbsp; &amp;nbsp;1 .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in&amp;nbsp;FatComp data set there are only "test and response" column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 16:48:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-CI-for-Sensitivity-Specificity-PPV-NPV-and-accuracy/m-p/951365#M47572</guid>
      <dc:creator>bhr-q</dc:creator>
      <dc:date>2024-11-20T16:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to get CI for Sensitivity, Specificity, PPV, NPV, and accuracy using TP, TN, FN, FP directly</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-CI-for-Sensitivity-Specificity-PPV-NPV-and-accuracy/m-p/951372#M47573</link>
      <description>I assume that means each subject is one observation and is one of the 4 conditions. If that is the case, then you just need to sum the columns to get the cell counts of the 2x2 table and then enter those totals in a DATA step like the FatComp example in the note.</description>
      <pubDate>Wed, 20 Nov 2024 17:08:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-CI-for-Sensitivity-Specificity-PPV-NPV-and-accuracy/m-p/951372#M47573</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2024-11-20T17:08:33Z</dc:date>
    </item>
  </channel>
</rss>

