Time Series Analysis Package
Example
This example uses the TSMODEL procedure to compute the similarity of two time series arrays: x and y.
data test;
input i x1 x2 x3 y1 y2 y3 r;
datalines;
1 3 2 4 2 3 2 1
2 5 4 5 4 5 3 1
3 3 3 4 6 4 5 1
4 3 6 6 7 6 7 1
5 3 5 5 3 5 7 1
6 6 6 6 8 8 8 1
7 3 8 5 9 9 8 1
8 8 9 8 3 7 3 1
9 6 7 6 8 4 9 1
10 7 9 8 9 6 7 1
;
run;
data mycas.testsim;
set test;
run;
proc tsmodel data=mycas.testsim
outscalar=mycas.sim_scalar
nthreads=1;
require tsa;
id i interval=day;
var x1 y1;
outscalars measure;
submit;
declare object TSA(tsa);
rc = TSA.SIMILARITY(x1, y1, 'absdev', 'NONE', , , , ,measure);
endsubmit;
run;
Copyright © SAS Institute Inc. All rights reserved.
Last updated: June 14, 2018