The EXPAND Procedure

PROC EXPAND Statement

PROC EXPAND options ;

The following options can be used with the PROC EXPAND statement:

Data Set Options

DATA= SAS-data-set

names the input data set. If the DATA= option is omitted, the most recently created SAS data set is used.

OUT= SAS-data-set

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.

OUTEST= SAS-data-set

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.

Options That Define Input and Output Frequencies

ALIGN= option

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.

FACTOR= n
FACTOR=( n : m )

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.

FROM= interval

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.

TO= interval

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.

Options to Control the Interpolation

EXTRAPOLATE

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.

METHOD= option
METHOD=SPLINE( constraint < , constraint > )

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.

OBSERVED= value
OBSERVED=( from-value , to-value )

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.

Options to Control Graphical Output

PLOTS= option | ( options )

specifies the graphical output desired. If the PLOTS= option is used, the specified graphical output is produced for each output variable that is specified by a CONVERT statement. By default, the EXPAND procedure produces no graphical output. The following PLOTS= options are available:

INPUT

plots the input series.

TRANSFORMIN

plots the transformed input series. The TRANSFORMIN= option must also be specified in the CONVERT statement.

CROSSINPUT

plots both the input series and the transformed input series on one plot with two Y axes. The input and transformed series are shown on separate scales. The TRANSFORMIN= option must also be specified in the CONVERT statement.

JOINTINPUT

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. The TRANSFORMIN= option must also be specified in the CONVERT statement.

CONVERTED

plots the converted series after input transformations and interpolation, but before any TRANSFORMOUT= transformations are applied. The METHOD= option must also be specified in the PROC EXPAND or CONVERT statements.

TRANSFORMOUT

plots the transformed output series. The TRANSFORMOUT= option must also be specified in the CONVERT statement.

CROSSOUTPUT

plots both the converted series and the transformed output series on one plot with two Y axes. The converted and transformed output series are shown on separate scales. The TRANSFORMOUT= option must also be specified in the CONVERT statement.

JOINTOUTPUT

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. The TRANSFORMOUT= option must also be specified in the CONVERT statement.

OUTPUT

plots the series stored in the OUT= data set. The OUTPUT option does not require any options to be specified in the CONVERT statement.

ALL

produces all plots except the joint and cross plots. PLOTS=ALL is the 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.