Learn R Programming

FARS (version 0.7.1)

plot.fars: Plot Method for fars Object

Description

Generates a line plot of the estimated quantiles from a fars object. If newdata is NULL, the function plots in-sample fitted quantiles; otherwise, it plots predictions computed on newdata. The x-axis can be indexed by a provided dates vector; if missing, an integer index is used.

Usage

# S3 method for fars
plot(x, newdata = NULL, dates = NULL, ...)

Value

Invisibly returns a ggplot object.

Arguments

x

An object of class fars.

newdata

Optional matrix or data frame with one column for the lagged dependent variable and r columns for the factors (same r used in compute_fars()).

dates

Optional vector of dates (as Date or zoo::yearqtr) to use for the x-axis. If not provided, a simple index is used.

...

Additional arguments (ignored).