Last Update: April 24, 2022
My online video tutorials are hosted at YouTube channel.
For learning this concept, you can view my online video tutorial: Exponential Smoothing: Brown Simple Method in R.
Video Code
1. Packages
library(forecast)
library(ggplot2)
2. Data
mdata <- AirPassengers
head(mdata)
Ranges Delimiting
tdata <- window(x = mdata, end = c(1958, 12))
fdata <- window(x = mdata, start = c(1959, 1))
3. Exponential Smoothing
Brown Simple Exponential Smoothing
brown <- ses(y = tdata, h = 24, PI = TRUE, level = c(80, 95),
initial = "optimal")
autoplot(object = brown) +
autolayer(object = fdata, color = "black", linetype = 2) +
labs(y = "Air Passengers", x = "Year")