Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

add_changepoints_to_plot

Get layers to overlay significant changepoints on prophet forecast plot.


Description

Get layers to overlay significant changepoints on prophet forecast plot.

Usage

add_changepoints_to_plot(
  m,
  threshold = 0.01,
  cp_color = "red",
  cp_linetype = "dashed",
  trend = TRUE,
  ...
)

Arguments

m

Prophet model object.

threshold

Numeric, changepoints where abs(delta) >= threshold are significant. (Default 0.01)

cp_color

Character, line color. (Default "red")

cp_linetype

Character or integer, line type. (Default "dashed")

trend

Logical, if FALSE, do not draw trend line. (Default TRUE)

...

Other arguments passed on to layers.

Value

A list of ggplot2 layers.

Examples

## Not run: 
plot(m, fcst) + add_changepoints_to_plot(m)

## End(Not run)

prophet

Automatic Forecasting Procedure

v1.0
MIT + file LICENSE
Authors
Sean Taylor [cre, aut], Ben Letham [aut]
Initial release
2021-03-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.