acf2Lagged {lagged} | R Documentation |
Convert "acf" objects to "Lagged" objects
Description
Convert "acf" objects to "Lagged" objects.
Usage
acf2Lagged(x)
Arguments
x |
an object from "S3" class "acf", typically obtained from
|
Details
acf2Lagged()
converts objects produced by acf()
and
friends to suitable "Lagged" objects.
Partial autocorrelations obtained from acf()
do not contain
value for lag zero. acf2Lagged()
puts the number 1 at lag zero
in the univariate case and a matrix of NA's in the multivariate case.
Value
an object from class "Lagged1d" (univariate case) or "Lagged3d" (multivariate case)
Author(s)
Georgi N. Boshnakov
Examples
## using examples from help(acf)
lh_acf <- acf2Lagged(acf(lh))
lh_acf[0:5]
acf(lh, plot = FALSE)$acf[1 + 0:5] # same
acf(ts.union(mdeaths, fdeaths))$acf[15,,]
deaths_mts <- ts.union(mdeaths, fdeaths)
deaths_acf <- acf2Lagged(acf(deaths_mts))
base_acf <- acf(deaths_mts)
## rho_14
deaths_acf[14]
base_acf$acf[1 + 14, , ] # same
## this is different and maybe surprising to some:
base_acf[14]
## (see also examples in \link{Lagged})
[Package lagged version 0.3.2 Index]