I want to display the year and month (e.g.: 2008-06, 2008-09, 2008-12, ‥) on the x-axis label when plotting the prediction result of time series analysis with autoplot.
(By default, the output will be as follows)
library(forecast)
#> Data
my_ts <- ts(data = c(410, 488, 415, 398, 419, 488, 414, 374),
start = c(2008, 3), frequency = 4)
#> Forecast
fc <- hw(my_ts, seasonal = "additive", h = 2)
#> Plot
autoplot(fc)
I want to display the x-axis labels as "2008-12", "2009-06", "2009-12", "..", but displayed as "2009-01", "2009-07", "2010-01", "..".
How should I fix it?
Thank you for your answering.
(It seems very nice!)
But I have a question.
Why is the prediction intervals different(getting wider) from the first ones?
Actually, there wasn't really enough data to estimate the full HW model, even though the forecast package tried to do so resulting in an over-fit with variances underestimated. The fable package is a little stricter and it fitted an equivalent model but without a trend term. This model can be estimated properly so the prediction intervals are more realistic.
I see. (Thank you!)
In the original method, I can check the values of various parameters(e.g.:alpha, beta, gamma, l, b, s) by executing "summary(fc)".
In this method, how can I do that?
Thank you!
Now, I have two additional questions.
Q1. For quarterly data, only 3 parameters of s(s0 to s2) are displayed and the total is not 0. How should I understand?
Q2. How can I get the lower(or upper) limit of the 80(or 95)% prediction intervals?