BookmarkSubscribeRSS Feed
jeka1212
Obsidian | Level 7
 data FatComp1;
         input Test Response Count;
         datalines;
         0 0  17
         0 1  21
         1 0  3
         1 1 39
         ;
      proc sort data=FatComp1;
         by descending Test descending Response;
         run;
      proc freq data=FatComp1 order=data;
         weight Count;
         tables Test*Response;
         run;


      title 'Positive predictive value';
      proc freq data=FatComp1;
         where Test=1;
         weight Count;
         tables Response / binomial( CL = CLOPPERPEARSON WILSON level="1");
         exact binomial;
         run;
   
      title 'Negative predictive value';
      proc freq data=FatComp1;
         where Test=0;
         weight Count;
         tables Response / binomial( CL = CLOPPERPEARSON WILSON level="0");
         exact binomial;
         run;

Hi,

Can anyone help?

 

In the example above I calculated the Negative predictive value (NPV) and Positive predictive value (PPV) . Now I need to know how to calculate the adjusted NPV and PPV with a prevelence of 6% with their 95% CI.

 

Many thanks  

1 REPLY 1
Norman21
Lapis Lazuli | Level 10

NPV and PPV are sensitive to prevalence, whereas likelihood ratios are not. Instead of dramatically reducing your prevalence from 75% to 6%, why not calculate the likelihood ratios as demonstrated on this page:

 

http://support.sas.com/kb/24/170.html

Norman.
SAS 9.4 (TS1M6) X64_10PRO WIN 10.0.17763 Workstation

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 912 views
  • 0 likes
  • 2 in conversation