Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 8. Formatting Variables, Recodin... > 8.5 What Goes and What Stays in a Da...

8.5 What Goes and What Stays in a Data Set

You have used DATA steps to read data into variables and to manipulate data such as defining new variables. After you have finished these tasks, you might want to simplify the data set by getting rid of extraneous variables. The options DROP and KEEP specify variables to be eliminated from or saved in a SAS data set. In addition to eliminating variables, you might want to keep observations that satisfy some criteria. The statements WHERE and IF enable you to specify values of variables that you want to keep in a SAS data set. For example, the following statement includes only observations of the numeric variable LITERACY that have missing values:

if literacy EQ .;


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial