[R] Cross-Correlation function (CCF) issues

manta mantino84 at libero.it
Mon Apr 20 23:36:02 CEST 2009


Dear all,
I have two series of returns and I want to find the cross-correlations
between these two series. I know of the ccf, but it does not work as I'd
like

if i type

ccf(x,y,lag.max=20,type="correlation",plot=FALSE)

i got the error message
Error in na.fail.default(ts.intersect(as.ts(x), as.ts(y))) : 
  missing values in object

So i found that somebody suggested to type
ccf(x,y,lag.max=20,type="correlation",na.action=na.contiguous,plot=FALSE)

but in this case I can only get the cross-correlations for four lagsm
whatever series i plug in the ccf functions (i.e. it's not a matter of the
particular series)

Any suggestions?
-- 
View this message in context: http://www.nabble.com/Cross-Correlation-function-%28CCF%29-issues-tp23145411p23145411.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list