Dear Rui Barradas
Thank you very much for your reply.
However, still now, I have a confusion whether I get the fitted value
for the year 2000, 2001, ..., 2020 or 2001, 2002, ..., 2021.
Need any more help.
Thanks in advance.
Md
On Thu, Jan 28, 2021 at 4:47 PM Rui Barradas <ruipbarradas at sapo.pt
<mailto:ruipbarradas at sapo.pt>> wrote:
Hello,
?From help('forecast::fitted.Arima'):
h? ? ? ?The number of steps to forecast ahead.
So you have the default h = 1 step ahead forecast for your model.
Hope this helps,
Rui Barradas
?s 12:13 de 28/01/21, Md. Moyazzem Hossain escreveu:
>? ?Dear R-experts,
>
> I hope that all of you are doing well. I got the filled value
> ARIMA model.
>
> I use the following working code. But I am not clear whether I
> fitted value for each *corresponding time* of the original data
> 2000, 2001, 2020 or get a *one-step-ahead* fitted value. Please
> any reference for further reading to my understanding.
>
> ########################
>
y<-c(120,340,250,430,125,324,763,458,763,905,765,456,234,345,654,654,567,876,907,456)
> library(forecast)
> library(tseries)
> yy=ts(y, start=c(2000,1))
>
> model1=Arima(yy,order=c(0,2,1), lambda = NULL,method='ML')
> model1
>
> f <- fitted( model1)
> plot(yy)
> plot(f)
>
> Thanks in advance.
>