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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.