BookmarkSubscribeRSS Feed
MisterJenn
Fluorite | Level 6

I am using a proc freq to get a table with relative risk and odd ratios. However I have a 3x2 table. So I wanted to know if there was a way to remove 'N/A' out of my table. 

Sas Code: 

 

proc sort data=glow; by descending priorfrac descending fracture;
proc freq data=glow order=data; 
table priorfrac*fracture/chisq relrisk;
run;

This is what the output looks like

Screen Shot 2022-11-23 at 9.06.05 PM.png

Screen Shot 2022-11-23 at 9.06.20 PM.png

 

2 REPLIES 2
Reeza
Super User

Add a WHERE statement.

 

where priorfrac ne 'NA';

@MisterJenn wrote:

I am using a proc freq to get a table with relative risk and odd ratios. However I have a 3x2 table. So I wanted to know if there was a way to remove 'N/A' out of my table. 

Sas Code: 

 

proc sort data=glow; by descending priorfrac descending fracture;
proc freq data=glow order=data; 
table priorfrac*fracture/chisq relrisk;
run;

This is what the output looks like

Screen Shot 2022-11-23 at 9.06.05 PM.png

Screen Shot 2022-11-23 at 9.06.20 PM.png

 



 

Ksharp
Super User
As Reeza pointed out .
RELRISK is only for 2x2 contingency table .
But yours is 3x2 .

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 667 views
  • 0 likes
  • 3 in conversation