[R] Time series reliability questions

From: John Theal <jtheal_at_free.fr>
Date: Wed, 23 Jul 2008 14:55:08 +0200

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_at_r-project.org 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. Received on Wed 23 Jul 2008 - 16:55:57 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 24 Jul 2008 - 00:32:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive