Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The EXPAND Procedure

OUTEST= Data Set

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 ai, bi, ci, and di be the values of the variables CUBIC, QUAD, LINEAR, and CONSTANT, respectively, for the ith observation for the series. Let xi 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

f(x)=ai(x-xi)3+bi(x-xi)2+ci(x-xi)+di

where the segment number i is selected as follows:

i = \cases{
i & such that x_{i}{\le}x\ltx_{i+1}, 1{\le}i\ltn\space \cr
1 & if x\ltx_{1}\space \cr
n & if x{\ge}x_{n}}

In other words, if x is between the first and last ID values ({x_{1}{\le}x\lt x_{n}}), 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 x1, then i=1. If x is greater than or equal to the last ID value ({x{\ge}x_{n}}), 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
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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