Description Usage Arguments Details Value See Also Examples
Compute the AutoCorrelation functions of the following elements: the theoretical ARMA model of each component, the estimator for each component, the filtered or estimated components.
1 2 3 4 5 |
x |
for |
mod |
the object of class |
lag.max |
maximum lag at which to calculate the autocorrelations. |
component |
a character, the label of the component for which the ACF is to be obtained. |
ci |
coverage probability for confidence interval. If this is zero or negative, confidence intervals are not computed |
ci.type |
a character, the type of confidence interval. See details. |
ci.class |
a character, the element that is taken as reference to computed the
confidence intervals. Ignored if |
plot |
logical, if |
... |
further arguments to be passed to |
The ACF is obtained upon the stationary transformation of the models
for the components and the estimators; i.e.,
non-stationary roots (if any) are removed from the AR polynomials.
The estimated components are also transformed according to the
polynomials x$ar$polys.nonstationary
that render the signals stationary.
Argument ci.type
behaves similarly to the same argument in plot.acf
.
If ci.type = "white"
, the confidence bands are fixed to
t_{alpha/2}/sqrt(n), where n is the number of observations
in the fitted model model
.
If ci.type = "ma"
, confidence bands are obtained upon Bartlett's approximations
for the standard deviations of the autocorrelations.
compare.acf
returns the ACF of the components, respectively
for their theoretical ARMA model, estimator and estimates.
plot.tsdecAcf
displays a plot and returns a invisible
copy of a matrix containing the confidence intervals.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Airlines model and monthly data
y <- log(AirPassengers)
fit <- arima(y, order=c(0,1,1), seasonal=list(order=c(0,1,1)))
dec <- ARIMAdec(y, fit, extend=72)
cacf <- compare.acf(x = dec, mod=fit, lag.max=24)
plot(cacf, component="seasonal")
# unexpected discrepancy between the ACF of the estimator and the
# ACF of the empirical signal
plot(cacf, component="trend")
# Nile time series
y <- Nile
fit <- arima(y, order=c(0,1,1))
dec <- ARIMAdec(y, fit, extend=16)
cacf <- compare.acf(x = dec, mod=fit, lag.max=24)
plot(cacf, component="trend")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.