Chapter Contents

Previous

Next
The PLOT Procedure

Example 10: Excluding Observations That Have Missing Values


Procedure features:
PROC PLOT statement option
NOMISS
Data set: EDUCATION

This example shows how missing values affect the calculation of the axes.


Program

options nodate pageno=1 linesize=80 pagesize=35;

 Note about code
proc sort data=education;
   by region;
run;
 Note about code
proc plot data=education nomiss;

 Note about code
    by region;
 Note about code
    plot expenditures*dropoutrate='*' $ state / href=28.6;
    title 'Plot of Dropout Rate and Expenditure Per Pupil';
run;




Output
PROC PLOT produces a plot for each BY group. Only the plot for the
Northeast
is shown. Because
New York
has a missing value for Expenditures, the observation is excluded and PROC PLOT does not use the value 35 for DropoutRate to calculate the horizontal axis. Compare the horizontal axis in this output with the horizontal axis in the plot for Northeast in Adding Labels to a Plot .
[HTML Output]
 [Listing Output]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.