# Time Series Analysis and Its Applications: With R Examples

## Second Edition

This is the site for the second edition of the text and is no longer maintained. Follow this link if you're looking for the site of the third edition
.

# Errata and Clarifications

These apply to the uncorrected printings.
Springer has gone to a Print on Demand (POD) service so there is no longer a numbered printing system to help identify printings. The easiest way to tell if you have an uncorrected printing is to look at Figure 1.1 on page 4. If the Johnson & Johnson time plot is a line without dots, then you have the uncorrected printing. If you see a line with dots, you have a corrected printing and you can find the errata for those printings here: Errata - Final.

## CHAPTER 1

• Page 29, Equation (1.34): (2π)n/2 should be (2π)k/2.

• Page 30, Property P1.1: … normally distsributed … should be … normally distributed …. As a point of clarification, in addition to pointing readers to Theorem A.7 prior to the statement of the property [and in particular, equation (A.56) on page 520] we should add a footnote to the property saying something like: The general conditions are that xt is iid with finite fourth moment. A sufficient condition for this to hold is that the data are white Gaussian noise. We thank Professor Philip Turk of the Department of Mathematics and Statistics at Northern Arizona University for asking for clarification.
• Page 42, Exercise 1.8 (b): Put a period at the end of the sentence.

## CHAPTER 2

• Page 56, Figure 2.3 and Page 78, Figure 2.17: It looks like mortality has been scaled by a factor of two in these graphs; that is, it looks like 2*mort is being plotted instead of mort, but we're not really sure it is a factor of 2. Both of those figures were produced in Splus on a laptop that doesn't exist anymore, so there's no telling what happened. There's no qualitative difference in the graphics so you can ignore this blooper, but we thought we'd point it out in case you were wondering. We thank Nalini Ravishanker of the Department of Statistics, University of Connecticut, for catching this.

• Page 68, below Equation (2.41):  β1(n/2)^ and β2(n/2)^ should be β1(1/2)^ and β2(1/2)^ , respectively.
• Pages 74-75, Example 2.12: Thanks to Matt Pettis from The Thomson Corporation for pointing out that in equation (2.52), xt should be xi. In addition, Naradaya should be Nadaraya. Also, in the R code, change bandwidth=5 to bandwidth=10. NB: In Figure 2.14, we used b = 10 as stated in the text. This seems to be a little too wide for the seasonal component because it smoothes away the little increases during the summer months. In fact, b = 5 seems to do a better job at picking up the little summer blips.

• Page 79, Problem 2.2: For this problem, the hint on how to run the analysis in R is not very good. You can find a better explanation in our little tutorial. Also, check out the alternative dynlm() just following the lm() example.

• Page 79, Problem 2.3: For this exercise, rather than generating only one random walk, it might be better to repeat the question a few times (three or four times ought to do it - and with different seeds, of course) and construct a grid of plots.

• Page 82, Problem 2.8: This problem was reworked for the new edition. Unfortunately, I don't think it was reworked enough. In particular, part (b) is misleading because it's really a two part question. Something like this should work:
(b.i) Plot yt. Do any time intervals, of the order 100 years, exist where one can observe behavior comparable to that observed in the global temperature records in Figure 1.2? (This phenomenon is discussed in the Climate Change Report in the section on A PALEOCLIMATIC PERSPECTIVE; page 8 of the report.)
(b.ii) Examine the ACF of yt and comment.
Also, in part (d): The formula for γu (h):   if |h| 1   should be   if |h|> 1.

## CHAPTER 3

• Page 103, Equation (3.37):  Although (3.37) is correct as written, we thank Jens Dick-Nielsen, Copenhagen Business School, for pointing out that the last equation, when j = max(p,q+1), is not needed as an initial condition... so you can change the range of (3.37) to 0 ≤ j < max(p,q+1).
• Page 116, Equation (3.72):  Pn+m-j n should be  Pn+m-j . n+m-j-1
• Page 125, Footnote 5: Add the following sentence: The notation AN(•,•) is described in Definition A.5, Appendix A.
• Page 128, below Equation (3.108): Change r10 = (1 - φ2) to r10 = 1/(1 - φ2).
• Page 140, Example 3.33, R code: Thanks to Leo Correia, an economics student from Brazil, for pointing out that
+ resid.star = sample(resids) should be
+ resid.star = sample(resids, replace=TRUE).
The default for sample is without replacement. The results for Example 3.33 are correct because we didn't do the analysis using the exhibited R code (note that the first sentence on page 140 is "To perform a similar bootstrap exercise...").

• Page 154, Footnote 8: If you use arima() to fit an ARIMA(p,d,q) model, R will calculate AIC with a penalty term of 2(p+q+1) if d > 0 or if you specify include.mean=F. If you use the default settings and d = 0, R will use a penalty term of 2(p+q+2). Thanks to Pierre Duchesne, University of Montreal, for verifying this. The R help file for AIC (type ?AIC in R) was the source of the confusion; the help file applies to lm() but not directly to arima().
• Page 154, Example 3.39: Thanks again to Pierre for pointing out that we did not include the constant as a parameter in the calculations of AICc and BIC. Those should read (changes in red):
```# AICc - see Section 2.2
> log(gnpgr.ma\$sigma2)+(222+3)/(222-3-2)  # MA(2)
 -8.287855
> log(gnpgr.ar\$sigma2)+(222+2)/(222-2-2)  # AR(1)
 -8.284898
# SIC or BIC - see Section 2.2
> log(gnpgr.ma\$sigma2)+(3*log(222)/222)   # MA(2)
 -9.251712
> log(gnpgr.ar\$sigma2)+(2*log(222)/222)   # AR(1)
 -9.263748
```
• Pages 160-164, Example 3.43: When determining the seasonal part of the model using Figure 3.25, one can argue that the ACF at seasonal (s=12) lags 1s, 2s, 3s, 4s, …, cuts off after lag 3s, whereas the PACF tails off at the seasonal lags. With all else being considered, this suggests fitting an ARIMA(1,1,1)×(0,1,3)12 model to the data, which seems to fit a little better than the suggested ARIMA(1,1,1)×(2,1,1)12 model (the models have the same number of parameters). Below is a comparison of the two fits using sarima.R, which is available in the section on Class R Code.
```> sarima(prod,1,1,1,2,1,1,12)     # ARIMA(1,1,1)×(2,1,1)12

ar1      ma1     sar1     sar2     sma1
0.5753  -0.2709  -0.2153  -0.2800  -0.4968
s.e.  0.1120   0.1300   0.0784   0.0619   0.0712

sigma^2 estimated as 1.351:  log likelihood = -568.22,  aic = 1148.43

\$AIC          \$AICc           \$BIC
 1.327435   1.333430     0.3801087

> sarima(prod,1,1,1,0,1,3,12)     # ARIMA(1,1,1)×(0,1,3)12

ar1      ma1     sma1     sma2    sma3
0.5706  -0.2608  -0.7432  -0.1397  0.2782
s.e.  0.1119   0.1295   0.0535   0.0647  0.0526

sigma^2 estimated as 1.314:  log likelihood = -564.24,  aic = 1140.48

\$AIC           \$AICc           \$BIC
 1.299957    1.305952     0.3526299
```

## CHAPTER 4

• Page 186, 3rd and 4th lines: γy(h) should be γv(h).
• Page 192, Equations (4.32), (4.33) and (4.34): A factor of n-1 is missing before the summands:
cov[•,•] =  n-1
 nΣt=1
 n Σs=1
 γ(s − t) ...
• Page 196, Example 4.9 R code: Thanks to Tom Wainwright of NOAA Northwest Fisheries Science Center, Newport, Oregon, for pointing out that
> rec = scan("/mydata/rec.dat") should be
> rec = scan("/mydata/recruit.dat")
• Page 197, third line from bottom: frequencey should be frequency
• Page 206, Example 4.11 R code: Thanks again to Tom Wainwright for noticing
> df = soi.smo2\$df should be
> df = soi.smo\$df

• Page 213, two lines below (4.74): ... negative a various ... should be ... negative at various ...
• Page 214, last paragraph: For clarity, change ... width of the rectangular window ... to ... width of the idealized rectangular window ...
• Page 216: The second equation from the bottom is missing a 2. It should be ... [1 + 2 cos(2π ω)] ...
• Page 225, equation (4.103): exp{i φxy(ω)} should be exp{i φxy(ω)}. Thanks to Douglas P. Wiens, Department of Mathematical and Statistical Sciences, University of Alberta, for pointing this out.
• Page 230, first paragraph: In the last sentence, change In addition, the harmonics ... is evident ... to In addition, the harmonics ... are evident ...

• Page 263, Exercise 4.15: Period missing at the end of the sentence.

## CHAPTER 5

• Page 275, Figure 5.2: The values in the figure are the negative of the π-weights; i.e., the figure shows −πj (.384) and not πj (.384) as stated.

• Page 281, line 6: Change … constant variance … to … constant conditional variance ….

• Page 282, Second bullet at bottom: If 3α1≥ 1, but ...   should be   If 3α12≥ 1, but ... .

• Pages 283-285, Example 5.3: The results for the Splus output on page 284 were obtained from S+GARCH Version 1.1 Release 2: 1998. We reran the analysis and below is the entire output. For some reason, the values in the text (which were edited to shorten the display) are slightly different than the values below. Thanks again to Pierre Duchesne (who verified the output below) for asking for clarification. We have no idea what happened.
```Call: garch(formula.mean = gnpr ~ar(1), formula.var= ~garch(1, 0))

Mean Equation: gnpr ~ ar(1)
Conditional Variance Equation:  ~ garch(1, 0)
Conditional Distribution:  gaussian

--------------------------------------------------------------
Estimated Coefficients:
--------------------------------------------------------------
Value  Std.Error t value   Pr(>|t|)
C 0.0052876 8.295e-004   6.374 5.400e-010
AR(1) 0.3637468 7.902e-002   4.603 3.535e-006
A 0.0000725 7.035e-006  10.305 0.000e+000
ARCH(1) 0.2012735 7.037e-002   2.860 2.321e-003
--------------------------------------------------------------
AIC(4) = -1436.53
BIC(4) = -1422.92

Normality Test:
--------------------------------------------------------------
Jarque-Bera P-value Shapiro-Wilk P-value
8.425 0.01481       0.9826  0.4778

Ljung-Box test for standardized residuals:
--------------------------------------------------------------
Statistic P-value Chi^2-d.f.
13.33  0.3452         12

Ljung-Box test for squared standardized residuals:
--------------------------------------------------------------
Statistic  P-value Chi^2-d.f.
27.03 0.007653         12

Lagrange multiplier test:
--------------------------------------------------------------
Lag 1  Lag 2 Lag 3   Lag 4  Lag 5   Lag 6 Lag 7 Lag 8
2.09 0.2293  1.04 -0.2954 0.7298 -0.8147  1.55 2.008
Lag 9 Lag 10 Lag 11  Lag 12       C
-1.705  1.097  2.392 -0.6218 -0.7981

TR^2 P-value F-stat P-value
25.43 0.01289  2.631 0.03724
```
• Page 302, Equation (5.72): The denominator should be n instead of (n − r).
• Page 302, Equation (5.73): Thanks to Professor Doug Wiens, University of Alberta, for pointing out a problem with the subscripts. The equation should look like: ... = {σii^cjj}½ for i = 1,...,k and j = 1,...,r, where ...
• Page 305, Below Example 5.10: Thanks to Douglas McLean of InterGen (UK) for pointing out that in the discussion of the VARMA process in the bottom half of the page, the dimensions of the parameter matrices Φ and Θ should be k × k instead of p × p. Also, Γ is k × r, not p × r.

## CHAPTER 6

• Page 356, Property P6.6: Remove the exogenous variables Γut from the observation equation, (6.105), and add them to the state equation, (6.104), as follows: xt+1 = ... + Υ ut+1 where Υ = [Γ 0 0 ... 0]' is pm × r. Thanks to Professor Doug Wiens, University of Alberta, for pointing out this blooper.
• Page 357: Thanks again to Douglas McLean for noticing that the second line of the page should have §6.1 not §5.1. Also, the paragraph just prior to §6.7, it should read Chapter 3, equation (3.106), not Chapter 2.

• Page 359, Equation (6.117): Thanks to Mark Greenwood, Montana State University, for pointing out that both occurences of Σt −1/2 in the Ht matrix should be Σt 1/2. The corresponding example (Example 6.12) is correct in this regard.
• Page 360, Figure 6.8 & Example 6.12: The labels for the figure are reversed. The caption should read:
Figure 6.8 Interest rate for three-month treasury bills (dotted line--circles) and quarterly inflation rate (line--squares) in the Consumer Price Index, 1953:1 to 1965:2.
In the example, the series should be yt = quarterly inflation rate and zt = quarterly interest rate. The model in the example remains the same; that is, yt = α + βt zt + vt is the observation equation. The results of the analysis are correct for the correctly named series.

## CHAPTER 7

• Pages 456 and 461, Tables 7.5 and 7.6: The explosions (EXP) aren't numbered successively, 1 to 8, although they should be.

## APPENDICES (AND BEYOND)

• Page 536, line 7 from the bottom:   exp(− 2 π i t ωj )   should be   exp(−2 π i t ω).
• p.540, proof of Lemma C.1: For consistency of notation, fx(ω) in the first line of the proof should be f(ω).
• p.542, paragraph above Lemma C.3: Put a period at the end of the sentence starting with The behavior of ..., and fix the left parenthesis on f(ω) to be f(ω).
• References: Add the following reference (cited in Problem 5.4, page 320):
Hamilton, J.D. and G. Lin (1996). Stock market volatility and the business cycle. J. App. Econ., 11, 573-593.
top