Your question is a bit confusing. "acfresidfit" is an object, of which we don't know the origin. with your test file, I arrive at the first correlations (but with integer headings) :
> residfit <- read.table("fileree2_test_out.txt") > acf(residfit) > acfresid <- acf(residfit) > acfresid Autocorrelations of series ‘residfit’, by lag 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1.000 -0.015 0.010 0.099 0.048 -0.014 -0.039 -0.019 0.040 0.018 0.042 0.078 -0.029 0.028 -0.016 -0.021 -0.109 17 18 19 20 21 22 23 24 25 0.000 -0.038 -0.006 0.015 -0.032 -0.002 0.014 -0.226 -0.030 Could you please check where the object acfresidfit is coming from and how you generated it? Cheers Joris On Tue, Jul 6, 2010 at 9:47 AM, nuncio m <nunci...@gmail.com> wrote: > Hi list, > I have the following code to compute the acf of a time series > acfresid <- acf(residfit), where residfit is the series > when I type acfresid at the prompt the follwoing is displayed > > Autocorrelations of series ‘residfit’, by lag > > 0.0000 0.0833 0.1667 0.2500 0.3333 0.4167 0.5000 0.5833 0.6667 0.7500 0.8333 > > 1.000 -0.015 0.010 0.099 0.048 -0.014 -0.039 -0.019 0.040 0.018 0.042 > > 0.9167 1.0000 1.0833 1.1667 1.2500 1.3333 1.4167 1.5000 1.5833 1.6667 1.7500 > > 0.078 -0.029 0.028 -0.016 -0.021 -0.109 0.000 -0.038 -0.006 0.015 -0.032 > > 1.8333 1.9167 2.0000 2.0833 > -0.002 0.014 -0.226 -0.030 > Residfit is a timeseries object at monthly interval (0.0833), Here I > understand R computed the correlation at lags 0 to 2 years. > > What is surprising to me is > if I type acfresidfit at the prompt the following is displayed > > Autocorrelations of series ‘residfit’, by lag > > 0 1 2 3 4 5 6 7 8 9 10 > > 1.000 -0.004 0.011 0.041 -0.056 0.019 -0.052 -0.027 -0.008 -0.012 -0.034 > > 11 12 13 14 15 16 17 18 19 20 21 > > 0.024 -0.005 0.006 -0.045 0.031 -0.035 -0.011 -0.021 -0.020 -0.010 -0.007 > > 22 23 24 25 > -0.038 0.017 0.051 0.038 > >From the header I understand both are autocorrelation computed at the same > lags. but the correlations are different > > where am I going wrong and which is the correct one. > > file residfit is also attached(filename-fileree2_test_out.txt) > Thanks > nuncio > -- > Nuncio.M > Research Scientist > National Center for Antarctic and Ocean research > Head land Sada > Vasco da Gamma > Goa-403804 > > ______________________________________________ > 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. > > -- Joris Meys Statistical consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control tel : +32 9 264 59 87 joris.m...@ugent.be ------------------------------- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php ______________________________________________ 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.