Hi Riccardo,
Great question. Zelig provides an intuitive format for analying seasonal
ARIMA models (here after sARIMA). The following is the general set-up for
a sARIMA model
z.out1<- zelig(Diff(Y,d,ds,per) ~ lag.eps(q,qs) + lag.y(p,ps), data =
mydata, model = "arima")
where:
Y<- time series to be analyzed
d<- order of intergration for time series
d.s<- order of integration for seasonal components
per<- the period of the time series
q<- number of error terms (innovations) to lag
q.s<- number of seasonal error terms to lag
p<- number of dependent variables to lag
p.s<- number of seasonal dependent variables to lag, based upon per, the
period
Let's say that you want to estimate an
ARIMA model with a period of 24, and you want to have a lag of one
dependent variable from the previous season, then you would specify the
following model:
z.out1<- zelig(Diff(Y, 0, 0, 24)~ lag.eps(0, 0) + lag.y(0, 1),
model="arima", data="your.data")
You can use more complicated ARIMA structures just by filling in the
appropriate arguments.
If you do not have any covariates to include, you can then forecast your
time series. Zelig offers a simulation approach that allows you to
include uncertainty from estimating coefficients in your forecasts, while
usually negligible, this provides more accurate representation of
uncertainty for long forecasts.
To do this you enter a "setx" command as follows,
x.out<- setx(z.out1, pred.ahead=10)
this predicts 10 periods ahead.
Then, you can generate simulated results as follows:
s.out<- sim(z.out1, x=x.out)
Please let me know if you are still running into trouble with the ARIMA
package.
Cheers,
Justin Grimmer
PhD Student
Department of Government
Harvard University
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options:
http://lists.gking.harvard.edu/?info=zelig
Zelig program information:
http://gking.harvard.edu/zelig/