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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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