CONVERT
variable = newname …< / options > ;
The CONVERT statement lists the variables to be processed. Only numeric variables can be processed.
For each of the variables listed, a new variable name can be specified after an equal sign to name the variable in the output
data set that contains the converted values. If a name for the output series is not given, the variable in the output data
set has the same name as the input variable. Variable lists may be used only when no name is given for the output series.
For example, variable lists can be specified as follows:
convert y1-y25 / observed=(beginning,end);
convert x--a / observed=average;
convert x-numeric-a / observed=average;
Any number of CONVERT statements can be used. If no CONVERT statement is used, all the numeric variables in the input data
set except those appearing in the BY and ID statements are processed.
The following options can be used with the CONVERT statement.
-
METHOD= option
METHOD=SPLINE( constraint < , constraint > )
-
specifies the method used to convert the data series. (The method specified by the METHOD= option is applied to the input
data series after applying any transformations specified by the TRANSFORMIN= option.) 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 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. The values supported are TOTAL,
AVERAGE, BEGINNING, MIDDLE, and END. In addition, DERIVATIVE can be specified as the to-value when the SPLINE method is used.
When only one value is specified, that value specifies both the from-value and the to-value. (That is, OBSERVED=value is equivalent to OBSERVED=(value, value).) If the OBSERVED= option is omitted from both the PROC EXPAND and the CONVERT statements, the default is OBSERVED=(BEGINNING,
BEGINNING). See the section OBSERVED= Option for details.
-
TRANSFORMIN=( operation … )
-
specifies a list of transformations to be applied to the input series before the interpolating function is fit. The operations
are applied in the order listed. See the section Transformation Operations later in this chapter for the operations that can be specified. The TRANSFORMIN= option can be abbreviated as TRANSIN=, TIN=,
or TRANSFORM=.
-
TRANSFORMOUT=( operation … )
-
specifies a list of transformations to be applied to the output series. The operations are applied in the order listed. See
the section Transformation Operations later in this chapter for the operations that can be specified. The TRANSFORMOUT= option can be abbreviated as TRANSOUT=,
or TOUT=.
Copyright © SAS Institute Inc. All Rights Reserved.