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 Subscript t Baseline greater-than 0 be the original time series, and let w Subscript t be the transformed series. The transformations are defined as follows:

Log

is the logarithmic transformation,

w Subscript t Baseline equals normal l normal n left-parenthesis y Subscript t Baseline right-parenthesis
Logistic

is the logistic transformation,

w Subscript t Baseline equals normal l normal n left-parenthesis c y Subscript t Baseline slash left-parenthesis 1 minus c y Subscript t Baseline right-parenthesis right-parenthesis

where the scaling factor c is

c equals left-parenthesis 1 minus e Superscript negative 6 Baseline right-parenthesis 10 Superscript minus normal c normal e normal i normal l left-parenthesis log Super Subscript 10 Superscript left-parenthesis max left-parenthesis y Super Subscript t Superscript right-parenthesis right-parenthesis right-parenthesis

and normal c normal e normal i normal l left-parenthesis x right-parenthesis is the smallest integer greater than or equal to x.

Square root

is the square root transformation,

w Subscript t Baseline equals StartRoot y Subscript t Baseline EndRoot
Box-Cox

is the Box-Cox transformation,

w Subscript t Baseline equals StartLayout Enlarged left-brace 1st Row 1st Column StartFraction y Subscript t Superscript lamda Baseline minus 1 Over lamda EndFraction 2nd Column lamda not-equals 0 2nd Row 1st Column normal l normal n left-parenthesis y Subscript t Baseline right-parenthesis 2nd Column lamda equals 0 EndLayout
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.

Last updated: June 19, 2025