For this week i will use Procolombia’s Exports between 2010 and 2022.
## Warning: Removed 16 row(s) containing missing values (geom_path).
## Warning: Removed 16 rows containing missing values (geom_point).
What we are going to do now is to use the NN method with a 0.5 lambda in order to get homocedastic residuals.
## Warning in nnetar(export, lambda = 0.5): Missing values in x, omitting rows
## Series: export
## Model: NNAR(3,1,2)[4]
## Call: nnetar(y = export, lambda = 0.5)
##
## Average of 20 networks, each of which is
## a 4-2-1 network with 13 weights
## options were - linear output units
##
## sigma^2 estimated as 44080646
Now we are going to simulate some possible paths in order to get an “accurate” idea about the distribution of Procolombia’s Exports.
## For a multivariate time series, specify a seriesname for each time series. Defaulting to column names.
So now we are going to forecast our NNAR(3,1,2). This means that we are using 3 lagged imputs and 2 nodes and 1 seasonal lag used as input.
## Warning: Removed 16 row(s) containing missing values (geom_path).
## ME RMSE MAE MPE MAPE MASE
## Training set 13497736 151468453 113355056 -6.72886 21.18711 0.5674346
## ACF1
## Training set -0.04524538
Graphically we obtained moderately expected results. Even so, we obtained a very high RMSE value, which would be indicating that our model fails to fit the data.