Chapter Contents |
Previous |
Next |

The EXPAND Procedure |

**PROC EXPAND***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 result time series.
If OUT= is not specified,
the data set is named using the DATA
*n*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.

**FACTOR=***n***FACTOR=***(n:m)***FACTOR=***(n,m)*-
specifies the number of output observations to be created from
the input observations.
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).

The FACTOR= option cannot be used if the TO= option is used. The default value is FACTOR=(1:1). For more information, see the "Frequency Conversion" section. **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 3, "Date Intervals, Formats, and Functions," for a complete description
and examples of interval specification.
**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 3, "Date Intervals, Formats, and Functions," for a description of interval specifications.
**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.

**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 "Conversion Methods" section 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
"The OBSERVED= Option" later in this chapter for details.
The default is OBSERVED=BEGINNING.
**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 not normally used.

Chapter Contents |
Previous |
Next |
Top |

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