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 .

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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