2:27 PM
To: Shubha Vishwanath Karanth
Cc: [EMAIL PROTECTED]
Subject: Re: [R] acf lag1 value
Please re-check your time-series books. The acf at lag 1 is _not_ the
correlation between x and lag(x). For one thing, the variance of x is
computed from the whole series, and not from the series with
Please re-check your time-series books. The acf at lag 1 is _not_ the
correlation between x and lag(x). For one thing, the variance of x is
computed from the whole series, and not from the series with either the
first or last value removed -- there is also the question of the divisor.
See MAS
Hi R,
I have doubt.
>x= c(4,5,6,3,2,4,5)
>acf(x,plot=F,lag.max=1)
Autocorrelations of series 'x', by lag
0 1
1.000 0.182
But if I actually calculate the autocorrelation at lag1 I get,
>cor(x[-1],x[-length(x)])
[1] 0.1921538
Even in excel I get 0.1921538 val
3 matches
Mail list logo