knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.width=8
)
library(forecastLM)
data("ny_gas")

library(TSstudio)

ts_plot(ny_gas,
        title = "The New York Natural Gas Residential Monthly Consumption",
        Ytitle = "Million Cubic Feet",
        Xtitle = "Source: US Energy Information Administration (Jan 2020)")
md <- trainLM(input = ny_gas, 
              y = "y",
              seasonal = "month",
              trend = list(linear = TRUE),
              lags = c(1,12))

fc <- forecastLM(md, h = 60)
plot_fc(fc)
plot_fc(fc, theme = "classic")
plot_fc(fc, theme = "darkBlue")
plot_fc(fc, theme = "darkPink")
plot_fc(fc, theme = "lightBeige")


RamiKrispin/forecastLM documentation built on April 4, 2020, 1:48 a.m.