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
.


. . . the third edition is NOT blue . . .
if it says third edition and it's blue, it's not the third edition

second edition Front Cover   :   Front Cover third edition


Getting Started With R

  • To download R, go to CRAN. The installation includes help files and some user manuals. In addition, you can find helpful tutorials by following CRAN's link to Contributed Documentation. If you're new to R/Splus, then R for Beginners is a great introduction. There's also a lot of advice out there in cyberspace, but some of it will be outdated because R goes through many revisions.
  • Here's a little tutorial on R and time series analysis: an R time series quick fix.
  • Here are some issues we have with R and time series analysis: R issues.

Data Files

The data files below are listed according to the chapter in which they are first presented. Most of the data files are one long column, even if they contain more than one series. Some data files are in multicolumn formats. It would be a good idea to look at the file before you use it. As you can see, the data files have .dat extensions, but they are ascii files that can be opened with any text editor (like notepad).


CHAPTER 1
eq5exp6.dat
fmri.dat
globtemp.dat   
jj.dat
nyse.dat
recruit.dat
soi.dat
soiltemp.dat
speech.dat
CHAPTER 2
cmort.dat
gas.dat
oil.dat
part.dat
temp.dat
varve.dat LApollution


CHAPTER 3
ar1boot.dat
birth.dat
globtemp2.dat
gnp96.dat
prod.dat
so2.dat
unemp.dat


CHAPTER 4
salt.dat
sunspots.dat







CHAPTER 5
flu.dat
fracdiff.dat
lead.dat
prob513.dat
sales.dat
sdyr.dat

CHAPTER 6
ar1miss.dat
Folland.dat
HL.dat
Jones.dat
Newbold.dat


CHAPTER 7
beamd.dat
bnrf1ebv.dat
bnrf1hvs.dat
ch7fmri.dat
clim-hyd.dat
econ5.dat
eqexp.dat
EVERYTHING
data.zip
(for windows)

data.tar.gz
(for unix)



R Code That May Be Useful for Class

  • Here's a list of the R code used in the examples in Chapters 1 to 5: R code used in the text.
  • A few useful scripts: Below are a few R scripts that may be helpful. You can get all of the code listed below in one file: itall.R. Just download the file to a convenient location and then "source" it. For information on how to source code, details and some examples, go here: EXAMPLES. Brief descriptions follow:
    • lag.plot2 can be used to get a grid of lagged scatterplots of one series versus another (as in Figure 2.8).
    • lag.plot1 is similar to R's lag.plot but it comes with some extra bells and whistles.

    • acf2 will give you both the sample ACF and PACF of a series... you get the values and a nice graphic.
    • sarima can be used to easily and quickly fit both seasonal and nonseasonal ARIMA models.
    • sarima.for is a companion to sarima and it gives the desired forecasts along with a nice graphic.
    • spec.arma can be used to exhibit the spectral density of a specified ARMA model. It can also be used to check causality and invertibility conditions of the model.

    If any or all of these sound intriguing, head on over to EXAMPLES for details and examples.

R Code and Examples for Chapter 6

... has been moved to Chapter 6 R Scripts and Examples

R and Matlab Code and Examples for Chapter 7

... was never here in the first place and it's still not here. But you can find it at Chapter 7 Code and Examples

ASTSA

astsa is now an R package ... for more details, go the page for the third edition tsa3

(the stuff below is old)

ASTSA is a Windows time series package that is distributed as Freeware and is provided “As is” without warranty of any kind, either expressed or implied. ASTSA may not be distributed as a component of any commercial product without a prior license agreement with the authors. If you do not agree with these terms, do not download the program. If you have questions about ASTSA, please contact RHS. Just so you know, ASTSA was written in Visual Basic 3, so it's a 16-bit application (think Windows 3.1). It seems to have held up and runs on XP with high probability. It's anyone's guess if it will run on Vista. ASTSA hasn't been supported for a long time, and there won't be any updates.

  • To install ASTSA, download ASTSAsetup.exe (less than 1 mb) to your desktop and run the setup program.
  • If you prefer, you can get ASTSA in a zipped archive: astsa.zip. Just download astsa.zip, unzip it to a convenient location, and put a shortcut to astsa.exe on your desktop and/or your start menu.
  • You can uninstall the program by simply deleting the ASTSA directory and any shortcuts that were created. ASTSAsetup puts one shortcut on the desktop and another on the Start-Programs menu.
  • You might also want the ASTSA manual. Many of the data sets used in the text are included with ASTSA - click here for details.

STuFF - LinKs and Other Useful Info

  • To request an evaluation copy of the text or to request an instructor's manual, follow this link to Springer. This will take you to the site for North America. You can select a different region from a menu at the top of the page.
  • This is a good Complex Numbers Primer, in case you are a bit rusty and need a good coat of primer.
  • If you are still data hungry, you can find lots of time series data here: StatLib Datasets. Just search on key words time series.
  • Anthony Brockwell has an open source time series package that runs on Windows and Linux called Cronos. You can use it to fit ARIMA, ARFIMA, GARCH, and Stochastic Volatility models using both Bayesian and frequentist analyses.
  • There are at least three R packages that facilitate state space modeling: DLM, DSE, and SSPIR.
  • Our web pages render beautifully with Firefox: Firefox 3