compare-acf: Compare ACF of Theoretical, Estimator and Empirical Component

Description Usage Arguments Details Value See Also Examples

Description

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.

Usage

1
2
3
4
5
compare.acf(x, mod, lag.max = 12, ...)
## S3 method for class 'tsdecAcf'
plot(x, component = c("trend", "transitory", "seasonal"), ci = 0.95, 
  ci.type = c("ma", "white"), ci.class = c("estimator", "theoretical", "empirical"), 
  plot = TRUE, ...)

Arguments

x

for compare.acf, an object of class ARIMAdec; for plot.tsdecAcf, an object of class tsdecAcf returned by compare.acf.

mod

the object of class Arima decomposed in x. See arima.

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 ci.class='white'.

plot

logical, if TRUE the ACF is plotted.

...

further arguments to be passed to acf and plot.

Details

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.

Value

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.

See Also

ARIMAdec.

Examples

 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")

Example output



tsdecomp documentation built on May 1, 2019, 9:15 p.m.