I've tried to find a package in R to train and implement a nonlinear autoregressive model with exogenous inputs (NARX) network with no success.
I want to use it for time series forecasting as it is more powerful than an ordinary feedforward network. MATLAB is not free and I did not like its NARX toolbox as I checked online.
What functions or package are there in R for such networks?
Edit: I have found tsDyn so far. MATLAB is not free and I did not like its NARX toolbook as I checked online. I prefer R as there are more resources out there
and returns a NARX neural network. NARX (Nonlinear autoregressive with external input) networks can learn to predict one time series given past values of the same time series, the feedback input, and another time series called the external (or exogenous) time series.
Create a NARX network. Define the input delays, feedback delays, and size of the hidden layers. Prepare the time series data using preparets. This function automatically shifts input and target time series by the number of steps needed to fill the initial input and layer delay states.
NARX model is a dynamic recurrent neural network that encloses several layers with feedback connections, Hayken. It has previously been applied by many researchers to model nonlinear processes, Coruh et al. applied NARX to predict the adsorption efficiency percentage for the removal of zinc ions from waste water.
NARX (Nonlinear autoregressive with external input) networks can learn to predict one time series given past values of the same time series, the feedback input, and another time series called the external (or exogenous) time series. Train a nonlinear autoregressive with external input (NARX) neural network and predict on new time series data.
You might want to look at this: http://cran.r-project.org/web/packages/tsDyn/vignettes/tsDyn.pdf
Type this:
install.packages("tsDyn");
library(tsDyn);
nnetTs(TimeSeriesObject,m=pvalue,size=20)
nnetTS in R is equivalent to NARX in Matlab. Here, pvalue is to be used for AR(p) model. Size also can be varied, default is 20. Choose 'm=pvalue' and 'size=j' in such a way that your RMSE is minimised. RMSE is given by,
rmse= mean((residuals(nnetTs(TimeSeriesObject,m=pvalue,size=j)))^2,na.rm=T)^0.5
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With