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:

  • For log transformation, c is bias: x = normal l normal o normal g left-parenthesis sans-serif-italic y plus sans-serif-italic c right-parenthesis. The default value is 0.

  • For square root transformation, c is bias: x = normal s normal q normal r normal t left-parenthesis sans-serif-italic y plus sans-serif-italic c right-parenthesis. The default value is 0.

  • For logit transformation, c is scaling: x = normal l normal o normal g left-parenthesis sans-serif-italic c times sans-serif-italic y slash left-parenthesis 1 minus left-parenthesis sans-serif-italic c times sans-serif-italic y right-parenthesis right-parenthesis right-parenthesis. The default value is 1.

  • For the Box-Cox transformation, c is lamda: x = sans-serif-italic c squared plus left-parenthesis sans-serif-italic y Superscript sans-serif-italic c Baseline minus 1 right-parenthesis slash sans-serif-italic c. If c is not specified, x=y.

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;
Last updated: July 09, 2026