acf2Lagged | R Documentation |
Convert "acf" objects to "Lagged" objects.
acf2Lagged(x)
x |
an object from "S3" class "acf", typically obtained from
|
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.
an object from class "Lagged1d" (univariate case) or "Lagged3d" (multivariate case)
Georgi N. Boshnakov
## 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})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.