[R] acf gives correlations > 1

Steve Jones steve at squaregoldfish.co.uk
Mon Sep 14 13:44:56 CEST 2009


Apologies for the missing data. It can be downloaded from here (22Kb):
http://www.squaregoldfish.co.uk/sekrett/series.csv

Steve.

Duncan Murdoch wrote:
> On 14/09/2009 6:40 AM, Steve Jones wrote:
>> Hi list,
>>
>> I've been producing autocorrelation functions of time series using the
>> acf function, and have found a series or two for which correlations of >
>> 1 are given, which I think shouldn't happen.
>>
>> Attached is the time series I'm using, and below is the R code (version
>> 2.9.1) that I'm entering:
>>
>> series <- read.csv("series.csv")
>> corr <- acf(series, lag.max=90, na.action=na.pass, plot=T)
>>
>> The first few values of corr are below:
>>
>> 0   1.000
>> 1   1.258
>> 2   1.192
>> 3   1.266
>> 4   0.864
>> 5   0.637
>>
>> The entries of concern are 1-3 - surely these results are invalid?
>>
>> I'd be grateful if you could shed any light on this for me.
>>
> 
> Your data file didn't show up.  (Some attachments are stripped; it's
> better to include data inline.)
> 
> Duncan Murdoch


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090914/34199be5/attachment-0002.bin>


More information about the R-help mailing list