Plots the historic values of variables in a dataset, or residuals of a VAR
model. Can separate variables with facets or with a colors (see
graph_type
).
Arguments
- x
Either a "varest" object for plotting the residuals, or an dataset (object coercible to data.frame) with numeric variables.
- series
A character vector with series (variables) to consider. Defaults to all (
NULL
).- index
A vector of labels to the x-axis, normally dates. Must have length equal to texts_vec. Defaults to a integer sequence.
- faceted
Should the graph be divided in facets?. If true,
args_aes
is ignored.- args_aes
Defines aesthetics to differentiate the data. A named list of aesthetics names (
*
) – arguments passed toggplot2::scale_*_manual
. See more in the 'Customization' section.- args_line
Additional arguments passed to geom_line (respectively). See more in the 'Customization' section.
- args_labs
Additional arguments passed to labs. If an empty list, will be changed to default values.
- args_facet
Additional arguments passed to the faceting engine used.
- ...
Arguments passed to methods, see the 'Methods' section.
Value
A ggplot.
Details
Customization
The graph can be customized both with the 'static' arguments passed to each layer – using the args_*
arguments –, and, if applicable, the 'dynamic' aesthetics – using the args_aes
argument.
The args_aes
is a list with '* = arguments to scale_*_manual
\
elements, where '*' represents the name of an aesthetic to apply to the \
data. View vignette('ggplot2-specs', 'ggplot2')
to see the available \
aesthetics.
After built, the result can be further customized as any ggplot, adding or overwriting layers with the ggplot's +. It is useful to understand the data and the mappings coded by the package, using the function get_gg_info.
See vignette('customizing-graphs')
for more details.
See also
Other general time series plots:
ggvar_acf()
,
ggvar_distribution()
Other historic values plots:
ggvar_fit()
,
ggvar_predict()
Other model diagnostics plots:
ggvar_acf()
,
ggvar_dispersion()
,
ggvar_distribution()
,
ggvar_select()
,
ggvar_stability()