BookmarkSubscribeRSS Feed
hira
Calcite | Level 5

Hi,

 

I am trying to get some missing data for the whole class by proc freq.

It can easily be achived by proc summary as below. for example if pregnant='Y' is complety missing , it will still produce the desire result.

 

proc summary data= test completetypes nway ;
  by allgrp nbyvar;
  class pregnent / preloadfmt;
  output out=test1(drop=_type_) / autoname;
  format pregnent  ynf. ;
run;

 

I would like to know the percent as well which is possible in proc freq as below but it does not give me the 0 count for pregnent='Y' even i tried sparse option too.

 

proc freq data= test1 noprint;
 by allgrp nbyvar;
 table pregnent/  out=test2;
 format &var1. ynf. ;
run;

 

 

Is there any way i can achive percent in proc summary or missing count in proc freq?

 

Thanks,

 

 

1 REPLY 1
ChrisNZ
Tourmaline | Level 20

It would be a lot easier to understand your need if you provided a data sample and an expected result.

I presume you saw this? What's missing there? 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1299 views
  • 0 likes
  • 2 in conversation