# Manual calculation of ARIMA(1,1,0) forecast

I have read the questions about the ARIMA and ARMA prediction here and here, and also here.

I'd like to make an one-step ahead forecast in-sample with the ARIMA(p=1,d=1,q=0) model. I have used the forecast packages:

library(forecast)
set.seed(1)
n<-252
mydata1 <- runif(n, 9000, 10000)
fit1<-Arima(mydata1[1:(n-1)], order=c(1,1,0))
forecast(fit1, h=1)$mean[1] # 9850.593 Then I have tried to use the predict() function predict(fit1, n.ahead=1)$pred[1]
# 9850.593

The reasults are equal. The ARIMA(1,1,0) model has only one coefficient ar1:

# [1] 9850.593