[Rd] Problems with arima function (PR#8743)

stoffer at pitt.edu stoffer at pitt.edu
Mon Apr 3 05:59:18 CEST 2006


I have written before, but to no avail.  I have found two minor 
problems with fitting time series models with R.  The thing is, they 
may be solved with MINOR adjustments to the code.

I have posted these problems with detailed examples here:
http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm

Briefly, the problems are
(1) When fitting time series models when there is an AR term present, 
the output says it's giving you the estimate of the intercept, when, 
in fact, it's giving you the estimate of the mean.  These are NOT the 
same when an AR term is present.  This occurs in everything I've seen, 
from ar.ols(), ar.mle(), ... and in arima().

(2) When fitting ARIMA models when there differencing, the constant 
term (intercept) is assumed to be zero.  This ignores the possibility 
that there is drift.  In this case, the estimation is WRONG.

Details and examples are at the url mentioned above.  To remedy (1), 
simply change "intercept" to "mean"  or actually list the intercept 
instead of the mean.  To remedy (2), allow for the option to include 
an intercept.  I tried using xreg in the arima command, but could not 
come up with a proper solution to this problem.

Thank you for your time.
D. Stoffer


-- 


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
David S. Stoffer
Department of Statistics
University of Pittsburgh
Pittsburgh, PA  15260

phone: [412] 624-8496
   fax: [412] 648-8814
email: stoffer at pitt.edu
   web: http://www.stat.pitt.edu/stoffer
voice: hey dave



More information about the R-devel mailing list