## a TARMA(1,1,1,1) model
set.seed(13)
x1 <- TARMA.sim(n=200, phi1=c(0.5,-0.5), phi2=c(0.0,0.5), theta1=-0.5, theta2=0.7, d=1, thd=0.2)
fit1 <- TARMA.fit(x1, method='L-BFGS-B',tar1.lags = 1, tar2.lags = 1, tma1.lags = 1,
tma2.lags = 1, d=1, threshold=0.2)
xp1 <- predict(fit1,x1,n.ahead=2)
xp1
Run the code above in your browser using DataLab