In SAS, how do I remove observations?
To remove observations in SAS, you can use the
statement in a
DATA step. Suppose you want to exclude all
observations whose scores are greater than 100. Consider the following
DATA step reads the data set
and then removes all observations that do not meet the condition specified
IF statement. The result is stored in the data set
You can also use the
IF statement in different ways; the
IF statements are equivalent to the one listed
If you have questions about using statistical and mathematical software at Indiana University, email UITS Research Analytics (formerly known as the Stat/Math Center). Research Analytics is located on the IU Bloomington campus at Woodburn Hall 200, and is open for consultation by appointment Monday-Friday 9am-5pm. For more, visit Research Analytics on the web, or call 812-855-4724 (IUB) or 317-278-4740 (IUPUI).
Last modified on January 25, 2013.