In: Computer Science
Create a code for A vector for forecasting and the value of alpha and provides an exponential smoothing forecast for the given dataset within R.
R code pasted below.
library(forecast)
y=c(446.7,454.5,455.7,423.6,456.3,440.6,425.3,485.1,506,526.8,514.3,494.2)
h=length(y)
#single exponential smoothing method
s=ses(y,h,initial="simple",alpha=0.2)
summary(s)
Output Screen