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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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