The EXPAND Procedure |
PROC EXPAND Statement |
The following options can be used with the PROC EXPAND statement:
names the input data set. If the DATA= option is omitted, the most recently created SAS data set is used.
names the output data set containing the resulting time series. If OUT= is not specified, the data set is named using the DATAn convention. See the section OUT= Data Set for details.
names an output data set containing the coefficients of the spline curves fit to the input series. If the OUTEST= option is not specified, the spline coefficients are not output. See the section OUTEST= Data Set for details.
controls the alignment of SAS dates used to identify output observations. The ALIGN= option allows the following values: BEGINNING | BEG | B, MIDDLE | MID | M, and ENDING | END | E. BEGINNING is the default.
specifies the number of output observations to be created from the input observations. FACTOR=n specifies that n output observations are to be produced for each input observation. FACTOR=( n : m ) specifies that n output observations are to be produced for each group of m input observations. FACTOR=n is the same as FACTOR=(n : 1).
In the FACTOR=() option, a comma can be used instead of a colon or the delimiter can be omitted. Thus FACTOR=( n, m ) or FACTOR=( n m ) is the same as FACTOR=( n : m ).
The FACTOR= option cannot be used if the TO= option is used. The default value is FACTOR=(1:1). For more information, see the section Frequency Conversion.
specifies the time interval between observations in the input data set. Examples of FROM= values are YEAR, QTR, MONTH, DAY, and HOUR. See Chapter 4, Date Intervals, Formats, and Functions, for a complete description and examples of interval specifications.
specifies the time interval between observations in the output data set. By default, the TO= interval is generated from the combination of the FROM= and the FACTOR= values or is set to be the same as the FROM= value if FACTOR= is not specified. See Chapter 4, Date Intervals, Formats, and Functions, for a description of interval specifications.
specifies that missing values at the beginning or end of input series be replaced with values produced by a linear extrapolation of the interpolating curve fit to the input series. See the section Extrapolation later in this chapter for details.
By default, PROC EXPAND avoids extrapolating values beyond the first or last input value for a series and only interpolates values within the range of the nonmissing input values. Note that the extrapolated values are often not very accurate and for the SPLINE method the EXTRAPOLATE option results may be very unreasonable. The EXTRAPOLATE option is rarely used.
specifies the method used to convert the data series. The methods supported are SPLINE, JOIN, STEP, AGGREGATE, and NONE. The METHOD= option specified on the PROC EXPAND statement can be overridden for particular series by the METHOD= option on the CONVERT statement. The default is METHOD=SPLINE. The constraint specifications for METHOD=SPLINE can have the values NOTAKNOT (the default), NATURAL, SLOPE=value, and/or CURVATURE=value. See the section Conversion Methods for more information about these methods.
indicates the observation characteristics of the input time series and of the output series. Specifying the OBSERVED= option on the PROC EXPAND statement sets the default OBSERVED= value for subsequent CONVERT statements. See the sections CONVERT Statement and OBSERVED= Option later in this chapter for details. The default is OBSERVED=BEGINNING.
specifies the graphical output desired. If the PLOTS= option is used, the specified graphical output is produced for each output variable specified by a CONVERT statement. By default, the EXPAND procedure produces no graphical output. The following PLOTS= options are available. Required options are listed in parentheses in the plot descriptions when necessary.
plots the input series
plots the transformed input series (TRANSFORMIN= option)
plots both the input series and the transformed input series on one plot with two Y axis. The input and transformed series are shown on separate scales. (TRANSFORMIN= option)
plots both the input series and the transformed input series on one plot with one Y axis. The input and transformed series are shown on the same scale. (TRANSFORMIN= option)
plots the converted series, after input transformations and interpolation but before any TRANSFORMOUT= transformations are applied (METHOD= option)
plots the transformed output series (TRANSFORMOUT= option)
plots both the converted series and the transformed output series on one plot with two Y axis. The converted and transformed output series are shown on separate scales. (TRANSFORMOUT= option)
plots both the converted series and the transformed output series on one plot with one Y axis. The converted and transformed output series are shown on the same scale. (TRANSFORMOUT= option)
plots the series stored in the OUT= data set (combination of TRANSFORMIN=, METHOD=, and TRANFORMOUT= options)
produces all plots except the Joint and Cross plots. (Same as PLOTS=(INPUT TRANFORMIN CONVERTED TRANSFORMOUT).)
The PLOTS= option produces results associated with each CONVERT statement output variable and the options listed in the PLOTS= specification. See the section PLOTS= Option Details for more information.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.