set.seed(614)
anchor_level <- c(`2015` = 11000, `2016` = 13500, `2017` = 15500, `2018` = 17500,
`2019` = 11000, `2020` = 9500, `2021` = 16500, `2022` = 15000,
`2023` = 6000, `2024` = 8000, `2025` = 12500, `2026` = 13000)
seas_true <- c(1.05, 0.92, 1.06, 1.00, 1.02, 1.30,
0.78, 0.92, 1.02, 1.05, 0.98, 0.90) # Jan ... Dec, sums to 12
pak <- tibble(date = seq(ymd("2015-01-01"), ymd("2025-12-01"), by = "month")) |>
mutate(
level = approx(x = as.numeric(ymd(paste0(names(anchor_level), "-06-15"))),
y = anchor_level,
xout = as.numeric(date), rule = 2)$y,
sales = round(level * seas_true[month(date)] * exp(rnorm(n(), 0, 0.07)))
) |>
select(date, sales)