I have two variables speed and vibration and you can see that speed causes vibration. I am trying to fit this using auto.arima. But when i plot the fitted model, it gives bad result
> head(datax.ts)
Time Series:
Start = 1
End = 6
Frequency = 1
vibration_x Speed
1 -0.252 12.47183
2 -0.668 1204.89032
3 -0.508 1211.75330
4 -1.492 1208.71899
5 -0.536 1207.32922
6 -0.936 1206.91174
> fit4 <- auto.arima(datax.ts[,1], xreg = datax.ts[,2])
> plot(datax.ts[,1], type = "l", x = index(datax.zoo))
> lines(fit4$fitted, col = "red", x = index(datax.zoo))
Black is my original data of Vibration_x column and Red color is the fitted model using Auto.arima.
Do i have to look for another model? or Am i doing something wrong here? I checked for autocorrelation.
I also would like to get suggested if there is any other model to work with. I tried VAR model which was again bad (Portmanteau Test for all lagged value was less then 0.05). Please help me.
Edited : (1) Replacing missing values with dummy values (2) I tried without missing values. But still the fit results in bad output.
Thank you.