Time Series Analysis Package
Example
This example uses the TSMODEL procedure to compute the cross-correlation and cross-covariance of two time series arrays (Price and Sale) with lag 20:
data mycas.pricedata (replace=yes); set Sashelp.pricedata; run;
proc tsmodel data=mycas.pricedata outarray=mycas.ccf_array
outscalar=mycas.ccf_scalar;
id date interval=month;
var price sale;
by region line product;
outscalars ymu xmu;
outarrays lags df ccov ccf ccfstd ccf2std ccfnorm ccfprob ccflprob;
require tsa;
submit;
declare object TSA(tsa);
rc=TSA.CCF(price, sale, 20, lags, df, ymu, xmu, ccov, ccf,
ccfstd, ccf2std, ccfnorm, ccfprob, ccflprob);
endsubmit;
run;
Copyright © SAS Institute Inc. All rights reserved.
Last updated: June 14, 2018