Adjusting Data with Filters : Creating and Applying Your Own Filter
To create a filter
to suit your own needs, you can customize a supplied filter by modifying its
preset values, or you can define a filter using SAS DATA step code.
The following steps create a filter by modifying
the preset values
of a filter provided with SAS/SPECTRAVIEW:
-
Load the appropriate data
set.
-
Select [Data], then [Filter
data].
-
Specify the filter template you want to customize
by selecting one of the following. You cannot customize the Median filter.
-
Select the filter element(s) that you want to
have the same value, and adjust the slider under Filter Value to set the value.
-
Select [Deselect buttons] to release
the selected elements.
-
If needed, adjust more element values.
-
Select [Apply filter] to apply
the customized filter to all response values in the data.
-
To reuse the customized filter, store it in a
SAS data set by selecting [Save filter] and specifying a one-
or two-level SAS data set name in the text window.
Using
SAS DATA step code, you can create a SAS data set containing a filter, which
can then be loaded into SAS/SPECTRAVIEW.
The following restrictions apply:
The following DATA step code creates a SAS data set
named BLEND, which contains a valid filter:
data blend;
do filter_x = 1 to 3;
do filter_y = 1 to 3;
do filter_z = 1 to 3;
filter = 1; output;
end; end; end;
run;
The following instructions apply a filter stored in
a SAS data set:
-
Load the appropriate data set.
-
Select [Data], then [Filter
data].
-
Select [Load filter] and enter
the data set name in the text window.
-
Select [Data set filter] to display
the filter matrix.
-
Select [Apply filter] to apply
the filter to all response values in the data.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.