Time series reliability questions

View: New views
2 Messages — Rating Filter:   Alert me  

Time series reliability questions

by John Theal-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Hello all,

I have been using R's time series capabilities to perform analysis for quite
some time now and I am having some questions regarding its reliability.  In
several cases I have had substantial disagreement between R and other packages
(such as gretl and the commercial EViews package).

I have just encountered another problem and thought I'd post it to the list.  In
this case, Gretl and EViews give me similar estimations, but R is completely
different.  The EViews results and gretl results are below followed by the R
results.  The model is an ARIMA(0,1,2) with a single exogenous regressor (X).
The same data set was used.  Here are the estimations:

EViews:

Dependent Variable: DSPOT
Method: Least Squares
Date: 07/23/08   Time: 14:37
Sample (adjusted): 2 518
Included observations: 517 after adjustments
Convergence achieved after 8 iterations
White Heteroskedasticity-Consistent Standard Errors & Covariance
Backcast: 0 1

Variable Coefficient Std. Error t-Statistic Prob.

X(-1) 3.419048 1.185199 2.884787 0.0041
MA(1) -0.049565 0.079305 -0.624994 0.5323
MA(2) -0.249748 0.100952 -2.473914 0.0137

R-squared        0.044155
Mean dependent var      0.613926
Adjusted R-squared 0.040436
S.D. dependent var 12.36165
S.E. of regression 12.10914
Akaike info criterion 7.831584
Sum squared resid 75368.51
Schwarz criterion 7.856235
Log likelihood        -2021.465
Durbin-Watson stat 1.969820
Inverted MA Roots .53         -.48

gretl:

Model 13: ARMAX estimates using the 517 observations 2-518
Estimated using Kalman filter (exact ML)
Dependent variable: (1-L) Spot
Standard errors based on Outer Products matrix

      VARIABLE       COEFFICIENT        STDERROR      T STAT   P-VALUE

  theta_1              -0.0491101        0.0439294    -1.118   0.26360
  theta_2              -0.248075         0.0439901    -5.639  <0.00001 ***
  X_1                   3.40437          1.21871       2.793   0.00522 ***

  Mean of dependent variable = 0.613926
  Standard deviation of dep. var. = 12.3617
  Mean of innovations = 0.843443
  Variance of innovations = 145.801
  Log-likelihood = -2021.5668
  Akaike information criterion (AIC) = 4051.13
  Schwarz Bayesian criterion (BIC) = 4068.13
  Hannan-Quinn criterion (HQC) = 4057.79

Finally, R:

gold.data <- cbind(ts(GoldData$Spot), lag(ts(GoldData$X),-1))

gold.2 <- arima(gold.data[,1], order = c(0,1,2),
        xreg=gold.data[,2], method="ML")

Call:
arima(x = gold.data[, 1], order = c(0, 1, 2), xreg = gold.data[, 2], method =
"ML")

Coefficients:
        ma1     ma2      gold.data[, 2]
      0.019  -0.202          -2.860
s.e.  0.050   0.045           3.371

sigma^2 estimated as 148:  log likelihood = -2021,  aic = 4050

EViews and Gretl give comparable (and I am inclined to presume, correct)
results.  R on the other hand, has the exogenous regressor with a negative
coefficient.  If I use other data I encounter the same problem - agreement
between EViews and Gretl, disagreement with R (for identical data sets).  Are
there any known bugs with arima estimation in R?  If I use the Zelig package, I
get the same results as the arima{stats} function call.  If I remove the
exogenous regressor from the estimations then I have agreement between R, Gretl
and EViews, but with the exogenous regressor (basically an ARMAX model) the
estimation results are substantially different.

______________________________________________
R-help@... mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: Time series reliability questions

by Achim Zeileis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 23 Jul 2008, John Theal wrote:

> EViews and Gretl give comparable (and I am inclined to presume, correct)
> results.  R on the other hand, has the exogenous regressor with a negative
> coefficient.  If I use other data I encounter the same problem - agreement
> between EViews and Gretl, disagreement with R (for identical data sets).  Are
> there any known bugs with arima estimation in R?

You can check at
   http://bugs.R-project.org/

> If I use the Zelig package, I
> get the same results as the arima{stats} function call.

...because zelig() is just an interface to arima() for ARIMA models.

> If I remove the
> exogenous regressor from the estimations then I have agreement between R, Gretl
> and EViews, but with the exogenous regressor (basically an ARMAX model) the
> estimation results are substantially different.

Log-likelihood, innovation variance and AIC seem to be similar though. It
might be a difference in parametrization between R and gretl/EViews.
Z

______________________________________________
R-help@... mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
LightInTheBox - Buy quality products at wholesale price