library(readxl)
library(fpp2)
## Loading required package: ggplot2
## Loading required package: forecast
## Loading required package: fma
## Loading required package: expsmooth
MoneyVelo <- read_excel("~/Predictive Analytics/MoneyVelo.xlsx", col_types = c("numeric", "numeric"))
View(MoneyVelo)
MoneyVelo_ts = ts(MoneyVelo$Velocity)
View(MoneyVelo_ts)
MoneyVelo_Neural_net = nnetar(MoneyVelo_ts)
MoneyVelo_neural_net_fcast = forecast(MoneyVelo_Neural_net,h = 50)
autoplot(MoneyVelo_neural_net_fcast)

summary(MoneyVelo_neural_net_fcast)
##
## Forecast method: NNAR(1,1)
##
## Model Information:
##
## Average of 20 networks, each of which is
## a 1-1-1 network with 4 weights
## options were - linear output units
##
## Error measures:
## ME RMSE MAE MPE MAPE
## Training set 7.960221e-07 0.1662075 0.1173628 -0.4554223 4.951277
## MASE ACF1
## Training set 0.9275149 0.009659928
##
## Forecasts:
## Point Forecast
## 103 1.714940
## 104 1.702187
## 105 1.691432
## 106 1.682393
## 107 1.674819
## 108 1.668487
## 109 1.663205
## 110 1.658807
## 111 1.655149
## 112 1.652112
## 113 1.649591
## 114 1.647502
## 115 1.645772
## 116 1.644339
## 117 1.643153
## 118 1.642172
## 119 1.641361
## 120 1.640690
## 121 1.640136
## 122 1.639678
## 123 1.639300
## 124 1.638987
## 125 1.638729
## 126 1.638516
## 127 1.638339
## 128 1.638194
## 129 1.638074
## 130 1.637975
## 131 1.637893
## 132 1.637825
## 133 1.637769
## 134 1.637723
## 135 1.637685
## 136 1.637654
## 137 1.637628
## 138 1.637606
## 139 1.637589
## 140 1.637574
## 141 1.637562
## 142 1.637552
## 143 1.637544
## 144 1.637537
## 145 1.637531
## 146 1.637527
## 147 1.637523
## 148 1.637520
## 149 1.637517
## 150 1.637515
## 151 1.637513
## 152 1.637512
# The forecast uses the last value and predictics a continuously decreasing trend that slowly levels out.