Skip to content
Prev 200574 / 398506 Next

ARMAX model fitting with arima

This is a follow-up to my request of yesterday.  Someone sent a private
reply indicating a chapter in the Shumway & Stoffer's book "Time Series
Analysis and Its Applications" [1], where some pitfalls of the arima
function are discussed.

In the meanwhile, I realized that the estVARXar function of the dse
package does estimate correctly the ARMAX parameters from my data.  Here
is the code, if someone is interested:

################################################################
### First, the data as I posted previously:
x <- u <- c (rep (0, 50), rep (1, 50))
x [1] <- 0
set.seed (0)
for (i in 2 : length (x)) {
    x [i] <- 0.3 * u [i] + 0.8 * x [i - 1] + 0.01 * rnorm (1)
}
### Second, the trivial DSE fitting:
library (dse1)
estVARXar (TSdata (input = u, output = x))
################################################################

[1] http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm

Cheers,

Rafael

* Rafael Laboissiere <rafael.laboissiere at inserm.fr> [2009-11-16 08:44]: