SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
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;

Hi,

Can anyone help?

In the example above I need to calculate the likelihood ratio LR+, LR- with their 95% CI and was wondering if you can help? 

 

Many thanks

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hi @jeka1212,

 

SAS Usage Note 24170 "Estimating sensitivity, specificity, positive and negative predictive values, ... contains a worked example where these statistics are calculated and a SAS macro NLEstimate is used to obtain 95% confidence intervals for them. Please apply this to your data and get back to us if you get stuck.

View solution in original post

3 REPLIES 3
ballardw
Super User

Not familiar with the 'LR+' and 'LR-' notation.

 

I suspect that you may want, at least partially

proc freq data=work.FatComp1 order=data;
   weight Count;
   tables Test*Response /or;
   run;

or

proc freq data=work.FatComp1 order=data;
   weight Count;
   tables Test*Response / cmh1;
   run;
jeka1212
Obsidian | Level 7
Thanks Ballardw. The LR+ and LR- are positive and negative likelihood ratio respectively. That is what I am looking for.
FreelanceReinh
Jade | Level 19

Hi @jeka1212,

 

SAS Usage Note 24170 "Estimating sensitivity, specificity, positive and negative predictive values, ... contains a worked example where these statistics are calculated and a SAS macro NLEstimate is used to obtain 95% confidence intervals for them. Please apply this to your data and get back to us if you get stuck.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 3 replies
  • 2318 views
  • 0 likes
  • 3 in conversation