phi=t(matrix(c(-0.3, 0.5,0.6,-0.3),2,2))
y=uTAR.sim(nob=2000, arorder=c(2,2), phi=phi, d=2, thr=0.2, cnst=c(1,-1), sigma=c(1, 1))
thr.est=uTAR(y=y$series, p1=2, p2=2, d=2, thrQ=c(0,1), Trim=c(0.1,0.9), method="RLS")
est=uTAR.est(y=y$series, arorder=c(2,2), thr=thr.est$thr, d=2)
uTAR.pred(mode=est, orig=2000,h=1,iteration=100,ci=0.95,output=TRUE)
Run the code above in your browser using DataLab