September 2017
Beginner to intermediate
560 pages
25h 18m
English
To apply the HoltWinters method for exponential smoothing and forecasting, follow these steps:
> infy <- read.csv("infy-monthly.csv")
> infy.ts <- ts(infy$Adj.Close, start = c(1999,3), frequency = 12)
> infy.hw <- HoltWinters(infy.ts)
> plot(infy.hw, col = "blue", col.predicted = "red")
The plotted result can be seen as follows:

> # See the squared errors > infy.hw$SSE [1] 1446.232 > ...
Read now
Unlock full access