Dear all,

I'm new to R and time series analysis. I'd appreciate if you could shed
light on my problem.

Here is what I have been trying to do:
1. I fit the model ARIMA(1,0,0) with the training dataset xdata[1:100]
fitit = arima(xdata, order=c(1,0,0)

2. I have some current observations in the buffer. Say that
buf = xdata_new[1:20]

3. I'm trying to forecast the xdata_new[21] based on the history
fore=predict(fitit,buf,n.ahead=1)

However, the results of fore$pred give me 20 predicted values from 101 to
120. I'm really confused why this happens. Could you give me some
suggestions? It'd be great if there is a similar example.

Thank you very much.

Best,
Jiakang

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to