SDIFF Function (CREATE command)

SDIFF produces new series based on seasonal differences of existing series.

  • The specification on SDIFF is the name or names of the existing series, the degree of differencing, and, optionally, the periodicity, all in parentheses.
  • The degree of differencing must be specified; there is no default.
  • Since the number of seasons used in the calculations decreases by 1 for each order of differencing, system-missing values will appear at the beginning of the new series.
  • You can specify only one degree of differencing per SDIFF function.
  • If no periodicity is specified, the periodicity established on TSET PERIOD is in effect. If TSET PERIOD has not been specified, the periodicity established on the DATE command is used. If periodicity was not established anywhere, the SDIFF function cannot be executed.
  • If either of the pair of values involved in a seasonal difference computation is missing, the result is set to system-missing in the new series.

Example

CREATE SDVAR = SDIFF(VARA,1,12). 
  • The series SDVAR is created by applying one seasonal difference with a periodicity of 12 to the series VARA.