Chapter Contents |
Previous |
Next |
The EXPAND Procedure |
The OUTEST= data set contains the coefficients of the spline curves fit to the input series. The OUTEST= data set is of interest if you want to verify the interpolating curve PROC EXPAND uses, or if you want to use this function in another context, (for example, in a SAS/IML program).
The OUTEST= data set contains the following variables:
For each BY group, the OUTEST= data set contains observations for each polynomial segment of the spline curve fit to each input series. To obtain the observations defining the spline curve used for a series, select the observations where the value of VARNAME equals the name of the series.
The observations for a series in the OUTEST= data set encode the spline function fit to the series as follows. Let a_{i}, b_{i}, c_{i}, and d_{i} be the values of the variables CUBIC, QUAD, LINEAR, and CONSTANT, respectively, for the ith observation for the series. Let x_{i} be the value of the ID variable for the ith observation for the series. Let n be the number of observations in the OUTEST= data set for the series. The value of the spline function evaluated at a point x is
where the segment number i is selected as follows:
In other words, if x is between the first and last ID values (), use the observation from the OUTEST= data set with the largest ID value less than or equal to x. If x is less than the first ID value x_{1}, then i=1. If x is greater than or equal to the last ID value (), then i=n.
For METHOD=JOIN, the curve is a linear spline, and the values of CUBIC and QUAD are 0. For METHOD=STEP, the curve is a constant spline, and the values of CUBIC, QUAD, and LINEAR are 0. For METHOD=AGGREGATE, no coefficients are output.
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.