Check the missing values

by Irina 21. July 2007 05:36

SAS version 9 has come up with nice useful options. For example NLEVELS options in PROC FREQ statement. This option in PROC FREQ statement is used to display the “Number of Variable Levels” . By using this options we can get the distinct count for each variable listed in the TABLES statement. If TABLES statement is omitted, by default it will display for all variables in that dataset.This little program uses NLEVELS options in order to create the table ( C ) that include variables contain missing values. It’s preferable to close output with command : ods listing close if the data contains a lot of variables . And after that to run the program. And don’t forget to open the output with command ods listing;

data a;

input x $1. y z ;

cards;

t  1 5

u  . 3

   . 2

;

run;

ods listing close;

ods output nlevels=b ;

proc freq data=a nlevels ;

tables _ALL_  / nofreq nopercent nocum ;

run;

ods output close;

 

data c(drop=NMissLevels);

set b(keep=TableVar NMissLevels where=(NMissLevels>0));

run;

ods listing ;

Related posts

Comments

8/8/2011 12:49:51 AM

It's okay... love looking at your lovely post.THANK YOU!
Not much words needed, really.THANK YOU

Pandora Charms

8/8/2011 12:50:23 AM


Lively and interesting picture and article is quite uplifting.I like it very much. THANK YOU!

Pandora Beads

8/8/2011 12:50:47 AM

This is my first post. I really like this blog. I’m reading this post from my I-Phone and it looks great!THANK YOU!

Christian Louboutin Shoes

8/8/2011 12:51:07 AM

This site is very meritorious and detestable,I appreciate!THANK YOU!

Thomas Sabo Charms

8/8/2011 12:51:27 AM


I am happy to find so many useful information here in the post, thanks for sharing it here. I hope you will adding

more...THANK YOU!

thomas sabo sale

Add comment


(will show your Gravatar icon)  





Live preview

2/5/2012 9:04:57 PM

 

About the author

Irina Spivak Irina Spivak
Team Leader at G-Stat. More...


Send mail Email

Blogroll

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2012

    Sign in

    eXTReMe Tracker