plot.lacfCI {locits} | R Documentation |
Plot confidence intervals for localized autocovariance for locally stationary time series.
Description
Plot the localized autocovariance and approximate confidence intervals.
Usage
## S3 method for class 'lacfCI'
plot(x, plotcor = TRUE, type = "line",
lags = 0:as.integer(10 * log10(nrow(x$lacf))), tcex = 1,
lcol = 1, llty = 1, ylim = NULL, segwid = 1,
segandcross = TRUE, conf.level = 0.95, plot.it = TRUE,
xlab, ylab, sub, ...)
Arguments
x |
The |
plotcor |
If |
type |
This can be one of three values |
lags |
The lags that you wish to display. This should be a list of non-negative integers, but not necessarily consecutive. |
tcex |
On the |
lcol |
On the |
llty |
As |
ylim |
The vertical limits of the plot. |
segwid |
On the |
segandcross |
If |
conf.level |
The confidence level of the confidence intervals. |
plot.it |
If |
xlab |
X-axis label, constructed internally if not supplied |
ylab |
Y-axis label, constructed internally if not supplied |
sub |
A subtitle for the plot |
... |
Other arguments to the main |
Details
This function can plot the localized autocovariance in
three ways. Like a regular acf plot (but obviously a slice
out of a time-varying autocovariance, not the regular acf),
a line plot which shows the acfs over time and a perspective
plot which can plot the estimate of c(z, \tau)
as a
2D function. Currently, the confidence intervals can only
be displayed on the "acf"
type plot.
Value
A vector of the extracted acfvals invisibly returned.
Note: what is returned depends on the arguments, what is
returned is what would have been plotted if plot.it
were TRUE
Author(s)
Guy Nason.
References
Nason, G.P. (2013) A test for second-order stationarity and approximate confidence intervals for localized autocovariances for locally stationary time series. J. R. Statist. Soc. B, 75, 879-904. doi:10.1111/rssb.12015
See Also
Examples
#
# Simulate a TVAR(1) process
#
x <- tvar1sim()
#
# Computes its time-localized autocovariance and confidence intervals
# Note: smoothing is done automatically!
#
x.lacf <- Rvarlacf(x=x, nz=50, var.lag.max=20)
#
# Now plot this, plot covariances as an acf plot, with the CIs
#
## Not run: plot(x.lacf, type="acf", plotcor=FALSE)
#
# Now plot it as a line plot, as correlations and can't do CIs
#
## Not run: plot(x.lacf)