See example for code for reproducing the data. This was used in Helske and Vihola (2021).
A time series
mts object with 200 time points and two series.
Helske J, Vihola M (2021). bssm: Bayesian Inference of Non-linear and Non-Gaussian State Space Models in R. The R Journal (2021) 13:2, 578-589. https://doi.org/10.32614/RJ-2021-103
# The data was generated as follows: set.seed(123) n <- 200 sd_level <- 0.1 drift <- 0.01 beta <- -0.9 phi <- 5 level <- cumsum(c(5, drift + rnorm(n - 1, sd = sd_level))) x <- 3 + (1:n) * drift + sin(1:n + runif(n, -1, 1)) y <- rnbinom(n, size = phi, mu = exp(beta * x + level))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.