## non-stationary AR(10)

Posted in Books, R, Statistics, University life with tags , , , , , on January 19, 2012 by xi'an

In the revision of Bayesian Core on which Jean-Michel Marin and I worked together most of last week, having missed our CIRM break last summer (!), we have now included an illustration of what happens to an AR(p) time series when the customary stationarity+causality condition on the roots of the associated polynomial is not satisfied.  More specifically, we generated several time-series with the same underlying white noise and random coefficients that have a fair chance of providing non-stationary series and then plotted the 260 next steps of the series by the R code

p=10
T=260
dat=seri=rnorm(T) #white noise

par(mfrow=c(2,2),mar=c(2,2,1,1))
for (i in 1:4){
coef=runif(p,min=-.5,max=.5)
for (t in ((p+1):T))
seri[t]=sum(coef*seri[(t-p):(t-1)])+dat[t]
plot(seri,ty="l",lwd=2,ylab="")
}


leading to outputs like the following one

## Checking for stationarity [X-valid'ed]

Posted in Books, Statistics, University life with tags , , , , , , , , on January 16, 2012 by xi'an

While working with Jean-Michel Marin on the revision of Bayesian Core, and more specifically on the time series chapter, I was wondering about the following problem:

It is well-known [at least to readers of  Bayesian Core] that an AR(p) process

$x_t=\sum_{i=1}^p \varrho_i x_{t-i} + \epsilon_t$

is causal and stationary if and only if the roots of the polynomial

$\mathcal{P}(u) = 1 - \sum_{i=1}^p \varrho_i u^i$

are all outside the unit circle in the complex plane. This defines an implicit (and unfriendly!) parameter space for the original parameters of the AR(p) model. In particular, when considering a candidate parameter, to determine whether or not the constraint is satisfied implies checking for the root of the associated polynomial. The question  I asked on Cross Validated a few days ago was whether or not there existed a faster algorithm than the naïve one that consists in (a) finding the roots of P and (b) checking none one them is inside the unit circle. Two hours later I got a reply from J. Bowman about the Schur-Cohn procedure that answers the question about the roots in O() steps without going through the determination of the roots. (This is presumably the same Issai Schur as in Schur’s lemma.) However,  J. Bowman also pointed out that the corresponding order for polynomial root solvers is O()! Nonetheless, I think the Schur-Cohn procedure is way faster.

## Time series

Posted in Books, R, Statistics with tags , , , , , , on March 29, 2011 by xi'an

(This post got published on The Statistics Forum yesterday.)

The short book review section of the International Statistical Review sent me Raquel Prado’s and Mike West’s book, Time Series (Modeling, Computation, and Inference) to review. The current post is not about this specific book, but rather on why I am unsatisfied with the textbooks in this area (and correlatively why I am always reluctant to teach a graduate course on the topic). Again, I stress that the following is not specifically about the book by Raquel Prado and Mike West!

With the noticeable exception of Brockwell and Davis’ Time Series: Theory and Methods, most time-series books seem to suffer (in my opinion) from the same difficulty, which sums up as being unable to provide the reader with a coherent and logical description of/introduction to the field. (This echoes a complaint made by Håvard Rue a few weeks ago in Zurich.) Instead, time-series books appear to haphazardly pile up notions and techniques, theory and methods, without paying much attention to the coherency of the presentation. That’s how I was introduced to the field (even though it was by a fantastic teacher!) and the feeling has not left me since then. It may be due to the fact that the field stemmed partly from signal processing in engineering and partly from econometrics, but such presentations never achieve a Unitarian front on how to handle time-series. In particular, the opposition between the time domain and the frequency domain always escapes me. This is presumably due to my inability to see the relevance of the spectral approach, as harmonic regression simply appears (to me) as a special type of non-linear regression with sinusoidal regressors and with a well-defined likelihood that does not require Fourier frequencies nor periodogram (nor either spectral density estimation). Even within the time domain, I find the handling of stationarity  by time-series book to be mostly cavalier. Why stationarity is important is never addressed, which leads to the reader being left with the hard choice between imposing stationarity and not imposing stationarity. (My original feeling was to let the issue being decided by the data, but this is not possible!) Similarly, causality is often invoked as a reason to set constraints on MA coefficients, even though this resorts to a non-mathematical justification, namely preventing dependence on the future. I thus wonder if being an Unitarian (i.e. following a single logical process for analysing time-series data) is at all possible in the time-series world! E.g., in Bayesian Core, we processed AR, MA, ARMA models in a single perspective, conditioning on the initial values of the series and imposing all the usual constraints on the roots of the lag polynomials but this choice was far from perfectly justified…