Hello,
I do not know what is the problem with my code. Can you please let me know what do I get the error message below??
Error: Invalid input: date_trans works with objects of class Date only
library(fma)
library(fpp)
library(ggfortify)
library(fpp2)
library(GGally)
library(forecast)
beer2 <- window(ausbeer,start=1992,end=c(2007,4))
beerfit1 <- meanf(beer2,h=10)
beerfit2 <- rwf(beer2,h=10)
beerfit3 <- snaive(beer2,h=10)
autoplot(window(ausbeer, start=1992)) +
autolayer(beerfit1, series="mean", PI=FALSE) +
autolayer(beerfit2, series="naive", PI=FALSE) +
autolayer(beerfit3, series="seasonal naive", PI=FALSE)