Learn R Programming

SynthesizerPlus (version 0.4.0)

plot_ts: Plot real and synthetic time series

Description

plot_ts() draws the real and synthetic series one above the other for each component; plot_acf() compares their autocorrelation functions.

Usage

plot_ts(real, synthetic = NULL)

plot_acf(real, synthetic, lag_max = 24L)

Value

A ggplot object.

Arguments

real

A ts object (or numeric vector/matrix).

synthetic

A synthetic ts with the same number of series.

lag_max

Maximum lag for the autocorrelation function.

Examples

Run this code
fit <- fit_synthesizer(ldeaths)
syn <- generate(fit, seed = 1)
plot_ts(ldeaths, syn)
plot_acf(ldeaths, syn)

Run the code above in your browser using DataLab