I am a beginner in R TimeSeries analysis. I have a .txt file having comma separated values like below:
I have run the below commands:
dd <- read.zoo("data.txt", index.column = 1, sep = ",", format = "%Y-%m-%d",
header = TRUE, FUN = as.Date)
dd_xts <- as.xts(dd)
model <- arima(dd_xts, order=c(2, 0, 1))
Now, plotting the fitted values via:
plot(fitted.Arima(model))
which does not have the same values of Time as the initial xts object on X-axis, as shown below:
What is going wrong??