beer_fit <- aus_production |>
filter(between(year(Quarter), 1992, 2007)) |>
model(
snaive = SNAIVE(Beer),
mean = MEAN(Beer)
)
beer_fit |>
forecast(h = 10) |>
autoplot(filter(aus_production, year(Quarter) >= 1990), level = NULL) +
labs(
title = "Forecasts for quarterly beer production",
x = "Quarter", y = "Megalitres"
) +
guides(colour = guide_legend(title = "Forecast"))


