# NOT RUN {
library(ggplot2)
set.seed(42)
Y = dataRWAR(n = 1e3, phi = .5, sdEta = 3, sdNu = 1, jumpSize = 15, type = "updown", nbSeg = 5)
y = Y$y
ggplot(data.frame(t = 1:length(y), y), aes(x = t, y = y)) +
geom_point() +
geom_vline(xintercept = Y$changepoints, col = 4, lty = 3)
# }
Run the code above in your browser using DataLab