Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

Time series cross correlation with lag

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 13
Accepted Solution

Time series cross correlation with lag

Hello, I want to check if some temperature data that I have are correlated, and I suspect there is a time-dependent lag.

I have tried the time-series analysis using cross correlation, but either I don't understand how to do it or something is wrong.

Finally I tested with the following data columns, where there should be full correlation for a lag of 7 rows:

A      A+7

1        8

2        9

3        10

4        11

etc.

What I got just doesn't make sense. There should be some way to see a full correlation of the data for a lag of 7.

lag7.png


Accepted Solutions
Solution
‎07-10-2017 04:02 PM
SAS Employee
Posts: 68

Re: Time series cross correlation with lag

Hi, I received a response from one of my R&D colleagues:

EM 13.1 includes the cross-correlation analysis in TS Correlation node.

However, EM users can do   cross correlation analysis using proc timeseries if they have ETS license.

The following pseudo code will calculate cross-correlation between t1  and t2.

proc timeseries data=yourdata   outcrosscorr=_out ;

id  MNTH_YR interval=MONTH accumulate=TOTAL;

var  t1;

crosscorr CCF CCFNORM lag n / nlag=24 ;

crossvar  t2;

run;

View solution in original post


All Replies
Solution
‎07-10-2017 04:02 PM
SAS Employee
Posts: 68

Re: Time series cross correlation with lag

Hi, I received a response from one of my R&D colleagues:

EM 13.1 includes the cross-correlation analysis in TS Correlation node.

However, EM users can do   cross correlation analysis using proc timeseries if they have ETS license.

The following pseudo code will calculate cross-correlation between t1  and t2.

proc timeseries data=yourdata   outcrosscorr=_out ;

id  MNTH_YR interval=MONTH accumulate=TOTAL;

var  t1;

crosscorr CCF CCFNORM lag n / nlag=24 ;

crossvar  t2;

run;

Occasional Contributor
Posts: 13

Re: Time series cross correlation with lag

Thank you.

I am looking for an answer in SAS JMP.

Unless I am doing somewhing wrong the Time Series lag correlation is not working.

I have tested Minitab, where it is working as it should.

SAS Employee
Posts: 68

Re: Time series cross correlation with lag

Your welecome.  I would recommend the JMP Coomunity https://communities.sas.com/community/support-communities/jmp_software

If that doesn't work, try filing a Tech Support track at support.sas.com.  They can look at your code and walk you through any remediation steps.

Thanks,

Jonathan

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 1820 views
  • 0 likes
  • 2 in conversation