[R] ccf time units
Gabor Grothendieck
ggrothendieck at gmail.com
Fri Mar 30 01:40:25 CEST 2007
The unit of time for a "ts" class object is deltat(ldeaths).
See the
?deltat
help page.
On 3/29/07, tom soyer <tom.soyer at gmail.com> wrote:
> Hi,
>
> I am using ccf but I could not figure out how to calculate the actual lag in
> number of periods from the returned results. The documentation for ccf
> says:"The lag is returned and plotted in units of time". What does "units of
> time" mean? For example:
>
> > x=ldeaths
> > x1=lag(ldeaths,1)
> > results=ccf(x,x1)
> > results
>
> Autocorrelations of series 'X', by lag
>
> -1.2500 -1.1667 -1.0833 -1.0000 -0.9167 -0.8333 -0.7500 -0.6667 -0.5833 -
> 0.5000
> -0.297 0.011 0.380 0.651 0.738 0.664 0.392 -0.011 -0.383 -
> 0.618
> -0.4167 -0.3333 -0.2500 -0.1667 -0.0833 0.0000 0.0833 0.1667 0.2500
> 0.3333
> -0.693 -0.619 -0.362 0.020 0.405 0.770 0.981 0.749 0.376 -
> 0.004
> 0.4167 0.5000 0.5833 0.6667 0.7500 0.8333 0.9167 1.0000 1.0833
> 1.1667
> -0.366 -0.610 -0.686 -0.602 -0.368 -0.012 0.388 0.650 0.705
> 0.614
> 1.2500
> 0.341
> I see that at time unit 0.0833, the correlation is close to 1. But how do I
> know time unit 0.0833 is actually lag 1? Is there a function to do the
> conversion?
>
> Thanks,
>
> Tom
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>
More information about the R-help
mailing list