Take the 2-minute tour ×  I am trying to check for auto-
correlation in a zoo object (monthly data with several columns)
using:  acf(jan, plot=F)$acf[2]  but I get the following error:
Error in na.fail.default(as.ts(x)) : missing values in object
To simplify, I extracted just one of the columns which I called
"a" (so now I have a simple zoo object with index and data), and
used:   but still get the same error. Can't acf be used in zoo
objects?  share|improve this question add comment  migrated from
stats.stackexchange.com Sep 5 '11 at 14:24   4 Answers  up vote
7 down vote accepted  Just use   That should work fine. Keep in
mind that you have to provide a regularly spaced time series for
that to give you a meaningful answer.  share|improve this answer
thanks! It now works if I do it just for one column but not for
the matrix, it gives me an error: > acf(coredata(feb)) Error in
acf(coredata(feb)) : 'lag.max' must be at least 0 –  sbg Sep 7
'11 at 15:26 I don't think you can use acf on multivariate
series. Wha