Neuralnet in R not giving me what I want to see I am currently working on some research and we are trying to do some Time-Series prediction using neural networks. To get started, I was using the paper published by G. Peter Zhang (Time Series forcasting using a hybrid ARIMA and NN model) since I am no expert in either R or statistics, I could really do with some help. 
I got R and the neuralnet lib setup and then took the Lynx dataset, then created a data-frame with the data long with the lags to set as input. My data now looks something like this (this is only for t, t-1, and t-2 lags) 
     x     x1    x2
1   269    NA    NA
2   321   269    NA
3   585   321    269

Now I want to train a NN with input x1 and x2 and get output at x.
I do the training with the following code 
nn <- neuralnet(x~x1+x2, data=dat, hidden = 2, linear.output = T) # I am using t-1 ... t-4 so using hidden layer of 2

This does train the model, but the error is really high, and when I use it to do any computation the results of the second layer neuron is alway 1. I was discussing with some freinds and they said that its because I am maybe using the wrong activation function. I looked in the help for the act.fct and tried with both logistic and tanh but the results remain the same. 
I have been stuck on this for a few days now, so could really use some help. May I am doing something wrong? Or missing something? 
Thanks
 A: So, 
Ill probably answer my own question, as now after more than a week of trying to figure out what was going wrong, I think I know what I was doing, and how to maybe solve it.
Firstly, I was having the problem with the hidden layer neurons, in that they would always output 1, now that was absurd and I did some looking under the hood, turns out everything was as it should be, i.e I did not do any mistake and the activation function was the sigmoid func that I wanted, the error is coming from the fact that the model is not adjusting the weights to lower the inputs to the hidden layer, and if the input to the hidden layer is any where close to 10 the sigmoid function is outputting a 1, which is then messing things up. Normally I would assume the weights to compensate for this, but some how it's not happening. 
A work around I found that seems okay at the moment is to normalize the data, it is giving me better results, but not as great as I'd expect. So? Use MATLAB its giving me a great OP
