Time Series Analysis Package
TRANSFORM Method
rc = TSA.TRANSFORM (y, <'type'>, <inverse>, <c>, <x>);
The TRANSFORM function transforms a time series to another form.
Required Arguments
You must specify the following arguments:
- y
specifies an input time series array.
Optional Arguments
You can also specify the following arguments, separated by commas. If you want to use a default value for any of these arguments, enter a space for it.
- type
-
specifies the type of transformation. You can specify the following values within single quotation marks:
- LOG
specifies logarithmic transformation.
- SQRT
specifies square root transformation.
- LOGIT
specifies logit transformation.
- BOXCOX
specifies Box-Cox transformation.
- NONE
requests that no transformation be performed.
The default value is NONE.
- inverse
-
specifies whether to perform an inverse transformation. You can specify the following values:
- 0
does not perform an inverse transformation.
- 1
returns the inverse of the specified transformation method.
The default value is 0.
- c
-
specifies a parameter to be used in the transformation. Its use depends on the transformation method as follows:
Returned Values
The TRANSFORM function returns the following values:
- rc
-
returns one of the following scalar return codes:
rc Termination Reason 0 Success < 0 Computational failure
Optional Returned Values
You can also specify the following arguments, separated by commas, to request additional returned values. If you do not want the value to be returned, enter a space for it.
- x
returns the transformed series.
Example
This example uses the TSMODEL procedure to take the log transform of the time series array Air:
proc tsmodel data=mylib.air outarray=mylib.trans_array;
id date interval=month;
var air;
outarrays t1;
require tsa;
submit;
declare object TSA(tsa);
rc=TSA.TRANSFORM(air, 'LOG', 0, 0, t1);
endsubmit;
run;