I started to check what I thought I knew with autocovariance and it doesnt jive with the the calculations given by R. I was wondering if there is some scaling or something that I am not aware of.
Take the example Ø d <- 1:10 Ø (a <- acf(d, type="covariance", demean=FALSE, plot=FALSE)) Autocovariances of series d, by lag 0 1 2 3 4 5 6 7 8 9 38.5 33.0 27.6 22.4 17.5 13.0 9.0 5.6 2.9 1.0 But when I calculate it manually (for lag of 1) like: Ø y1 <- d mean(d) Ø dl <- c(d[-1], d[1]) Ø y2 <- dl mean(d) Ø mean(y1*y2) [1] 3.75 What am I missing to get this basic concept? Isnt it E[(Yt ut)(Ys us)]? Thank you. Kevin [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.