step_trend: Step change trend response model

step_trendR Documentation

Step change trend response model

Description

Step change trend response model

Usage

step_trend(t, change_points, means, ...)

Arguments

t

numeric; vector of time points.

change_points

numeric; vector of change points, within t

means

numeric; vector of means for the regimes implied by change_points. Must be of length length(change_points) + 1.

...

other arguments. Ignored here.

Examples


sims <- step_trend(1:100, change_points = c(25, 75), means = c(2, 8, 4))
sims

library("ggplot2")
ggplot(sims, aes(x = t, y = trend)) +
  geom_step()


regime-shifts/abrupt documentation built on Aug. 26, 2022, 3:15 p.m.