r - How to find the cross correlation between two time series over different periods? -


i have 2 time series. each point in either time series week. week here not calendar week, first week in calendar year starts jan 1, , other weeks in same year follow that, , last week of year may contain more 7 days no more 13 days.

the first time series stored in compressed (.gz) text file a.gz, looks (each week , corresponding time series value separated comma in line):

week,value 20060101-20060107,0 20060108-20060114,5 ... 20061217-20061223,0 20061224-20061230,0 20070101-20070107,0 20070108-20070114,4 ... 20150903-20150909,0 20150910-20150916,1 

the second time series b stored in compressed (.gz) text file b.gz, on subset of period of a, looks like:

week,value 20130122-20130128,509 20130129-20130204,204 ... 20131217-20131223,150 20131224-20131231,148.0 20140101-20140107,365.0 20140108-20140114,45.0 ... 20150305-20150311,0 20150312-20150318,364 

i wonder how calculate cross correlation between 2 time series , b (up specified maximum lag), , plot , b in single plot, in r?

thanks


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -