[R] how do I do the autocovariance of a moving average?

Rampagegrl takaishi_blackwings at hotmail.com
Tue Jan 24 01:27:04 CET 2012


Hi guys,  

I'm trying to do the autocovariance of a moving average but it's giving me
errors.  Here is my code:

> w=rnorm(500,0,1)
> v=filter(w, sides=2, rep(1/3,3))
> acf(w, lag.max=20)  <=that printed out a nice graph.
> acf(v, lag.max=20)
Error in na.fail.default(as.ts(x)) : missing values in object

thanks a lot.

--
View this message in context: http://r.789695.n4.nabble.com/how-do-I-do-the-autocovariance-of-a-moving-average-tp4322558p4322558.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list