Learn R Programming

dse (version 2020.2-1)

tfplot.forecastCov: Plots of Forecast Variance

Description

Generate plots of forecast variance calculated by forecastCov.

Usage

# S3 method for forecastCov
tfplot(x, ...,
       series = 1:dim(x$forecastCov[[1]])[2], 
       select.cov = 1:length(x$forecastCov), select.true =TRUE, 
       select.zero =TRUE, select.trend =TRUE, y.limit = NULL, line.labels =FALSE, 
       lty = NULL, Legend = NULL, Title = NULL,
       graphs.per.page = 5, mar=par()$mar, reset.screen=TRUE)
    # S3 method for forecastCovEstimatorsWRTdata
tfplot(x, 
        series=1:dim(x$forecastCov[[1]])[2], 
        select.cov=1:length(x$forecastCov),
        select.zero=TRUE, select.trend=TRUE,
        graphs.per.page = 5, mar=par()$mar, reset.screen=TRUE, lty=NULL, ...)

Arguments

x

The result of forecastCov.

series

integer or string indicating the series which should be plotted.

select.cov

logical indicating that for the case of multiple models select the covariance to be plotted.

select.true

logical indicating that results from the forecast of the true model (if available) should be plotted.

select.zero

logical indicating that results from a forecast of zero should be plotted.

select.trend

logical indicating that results from a forecast of trend should be plotted.

graphs.per.page

The number of graphs to put on a page.

mar

plot margins (see par).

reset.screen

logical indicating if the plot window should be cleared before starting.

lty

see details.

Legend

optional legend passed to legend.

Title

optional legend passed to title (but see details).

y.limit

optional limit on the y scale. Covariance values larger than y.limit will not be shown.

line.labels

logical indicating line labels should be printed.

...

For forecastCov objects this allows additional objects to be plotted. For forecastCovEstimatorsWRTdata ... are passed to other methods.

Value

None

Details

This function produces plots of the variance at different horizons. Output graphics can be paused between pages by setting par(ask=TRUE). If lty is NULL (default) it is set to seq(length(select.cov) +select.true+select.zero+select.trend), and corrected if these are TRUE but not in the object.

The Title is not put on the plot if the global option PlotTitles is FALSE. This can be set with options(PlotTitles=FALSE). This provides a convenient mechanism to omit all titles when the title may be added separately (e.g. in Latex).

See Also

plot

Examples

Run this code
# NOT RUN {
    data("eg1.DSE.data.diff", package="dse")
    model <- estVARXls(eg1.DSE.data.diff)
    z <- forecastCov(model, data=eg1.DSE.data.diff)
    tfplot(z)
# }

Run the code above in your browser using DataLab