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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—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
  • 828 views
  • 0 likes
  • 3 in conversation