The SIMILARITY Procedure

Time Series Transformation

Transformations are useful when you want to stabilize the time series before computing the similarity measures. There are four transformations available, for strictly positive series only. Let ${y_{t} > 0}$ be the original time series, and let ${w_{t}}$ be the transformed series. The transformations are defined as follows:

Log

is the logarithmic transformation,

\[  w_{t} = \mr{ln}(y_{t})  \]
Logistic

is the logistic transformation,

\[  w_{t} = \mr{ln}(c y_{t} / (1-c y_{t}))  \]

where the scaling factor ${c}$ is

\[  c = (1-e^{-6}) 10 ^{- \mr{ceil}( \mr{log}_{10}({max}( y_{t}) ))}  \]

and ${\mr{ceil}(x)}$ is the smallest integer greater than or equal to x.

Square root

is the square root transformation,

\[  w_{t} = \sqrt {y_{t}}  \]
Box-Cox

is the Box-Cox transformation,

\[  w_{t} = \begin{cases}  \frac{y_{t}^{{\lambda }} - 1}{\lambda } &  {\lambda } {\ne } 0 \\ \mr{ln}( y_{t}) &  {\lambda } = 0 \end{cases}  \]
User-Defined

is the transformation computed by a user-defined subroutine that is created by using the FCMP procedure, where User-Defined is the subroutine name.

Other time series transformations can be performed prior to invoking the SIMILARITY procedure by using the SAS/ETS EXPAND procedure or the DATA step.