I have a time series data as such:
> dput(df)
structure(list(Date = c("Q1-2000", "Q2-2000", "Q3-2000", "Q4-2000",
"Q1-2001", "Q2-2001", "Q3-2001", "Q4-2001", "Q1-2002", "Q2-2002",
"Q3-2002", "Q4-2002", "Q1-2003", "Q2-2003", "Q3-2003", "Q4-2003",
"Q1-2004", "Q2-2004", "Q3-2004", "Q4-2004"), x = c(14, 16, 26,
11, 18, 16, 14, 24, 24, 12, 20, 18, 10, 28, 16, 30, 10, 23, 20,
16)), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA,
-20L))
I wish to forecast using forecast function from the library(forecast) but with different historical time. I wish to forecast 4 Quarters ahead. For example, I want to forecast value of Q4-2002 using data from Q1-2000 to Q4-2001; forecast value for Q1-2003 using data from Q1-2000 to Q1-2002 and etc.