Skip to content
Prev 179150 / 398502 Next

arima, xreg, and the armax model

Hi Marc- I have been [and am] extremely busy and haven't had much time to be
a playeR (lately I've become more of a moveR and shakeR ... some say more of
a boozeR and a loseR ... it's all prespective :).  I've updated the web page
with a little more info, but when I find the time I'll put up some ARMAX
examples on the Ch 6 page (state space models).  I think Paul Gilbert's DSE
package will do the job if you need it now.

The arima() help file says xreg does regression with autocorrelated errors,
and that is indeed what it does. The key line in arima.R is:  if(ncxreg > 0)
x <- x - xreg %*% par[narma + (1L:ncxreg)], so you see it replaces "x(t)"
with "x(t)-beta*xreg(t)" so to speak.  

... and, as usual, I stand on the GNU General Public License clause that
proclaims anything I say or do comes without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE (not that there's
anything wrong with being fit for a particular purpose).
Marc Anonym-2 wrote:
-----
The power of accurate observation is commonly called cynicism 
by those who have not got it.  George Bernard Shaw