1

I cannot figure out how na.pass in the acf function in R addresses NAs. For example:

a<-acf(x=c(1,NA,2),na.action = na.pass)
a$acf

I get the following results:

> a$acf
, , 1
       [,1]

[1,] 1.0000000 [2,] NA [3,] -0.3333333

To be honest I really couldn't get the value -0.3333333.

I am so confused about how the function treats NA in the very bottom? The original equation is:

def

But what is the equation for an irregular time series? (I don't want to use na.exclude, I want to keep the NAs in my data!)

Thanks!

CuteCat
  • 221
  • 2
  • 9

0 Answers0