BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
LOLO12
Obsidian | Level 7

how to create an output data set for sensitivity and specificity 

 

proc freq data=data;
table A*B/  SENSPEC ;
run;

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @LOLO12,

 

Add the appropriate ODS OUTPUT statement to your PROC FREQ step (or immediately before it):

ods output senspec=want;

This assumes that your SAS version is at least 9.4M6 because the SENSPEC option of the TABLES statement was not yet available in maintenance release 5 (which I am using).

 

See ODS OUTPUT: Store any statistic created by any SAS procedure for more background information.

View solution in original post

3 REPLIES 3
FreelanceReinh
Jade | Level 19

Hello @LOLO12,

 

Add the appropriate ODS OUTPUT statement to your PROC FREQ step (or immediately before it):

ods output senspec=want;

This assumes that your SAS version is at least 9.4M6 because the SENSPEC option of the TABLES statement was not yet available in maintenance release 5 (which I am using).

 

See ODS OUTPUT: Store any statistic created by any SAS procedure for more background information.

LOLO12
Obsidian | Level 7

What is the name of the table? I searcher sas and I couldn't find the name for the sensitivity and specificity table. 

FreelanceReinh
Jade | Level 19

The ODS table name is SenSpec (case-insensitive) and can be found on the page "ODS Table Names" of the "Details" section of the PROC FREQ documentation.

 

This is very similar to other (statistical) procedures: In virtually all cases, clicking on "Details" in the menu under the procedure name ("The XXXXXX Procedure") in the documentation will open a drop-down list with "ODS Table Names" and (if applicable) "ODS Graphics" as the last two entries.

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1148 views
  • 0 likes
  • 2 in conversation