Hi,

I have been using this site (
http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm) to help me with some
ARIMA modelling in R.
Unfortunately the methods mentioned do not appear to work with second order
differencing; arima(*, 2, *).

I have used some dummy data  to illustrate my point.

When I use the xreg=... method, the estimate of intercept is *way* off. This
can be seen by the high s.e but I *have* checked it in SPSS. This in turn
gives the wrong t and p values (using the data that I'm actually working
with; these are NaNs).
Despite this problem, the forecast is correct and follows the trend.

dat<-c(4,5,9,7,10,15,12,13,17,25,20,29,26,31,32)
ts.dat=ts(dat, start=c(1978, 2), frequency=4)
ts.plot(ts.dat)
arima.dat<-arima(ts.dat,order=c(1,2,0),xreg=1:length(dat))
arima.dat
tvalue<-(arima.dat$coef)/(diag(sqrt(arima.dat$var.coef)))
tvalue
deg.free<-length(dat)-length(arima.dat$coef)
pvalue<-round(2*pt(-abs(tvalue),deg.free),digits=4)
pvalue

fore.arima.dat<-predict(arima.dat, 20,
newxreg=(length(ts.dat)+1):(length(ts.dat)+20))
ts.plot(ts.dat, fore.arima.dat$pred)

Using the diff(diff(...)) method produces the correct t and p values but the
forecast looks terrible:

dat<-c(4,5,9,7,10,15,12,13,17,25,20,29,26,31,32)
ts.dat=ts(dat)
ts.plot(ts.dat)
diff.ts.dat<-diff(ts.dat)
diff.ts.dat<-diff(diff.ts.dat)
arima.dat<-arima(diff.ts.dat,order=c(1,0,0))
arima.dat
tvalue<-(arima.dat$coef)/(diag(sqrt(arima.dat$var.coef)))
tvalue
deg.free<-length(dat)-length(arima.dat$coef)
pvalue<-round(2*pt(-abs(tvalue),deg.free),digits=4)
pvalue

fore.arima.dat<-predict(arima.dat, 20)
ts.plot(ts.dat, fore.arima.dat$pred)

Can anybody suggest a solution (i.e. a fix that means that only one method
is used)?

Thanks.

W.

	[[alternative HTML version deleted]]


