# Introductory Time Series with R

## by Paul S.P. Cowpertwait and Andrew Viggo Metcalfe

### Springer. ISBN: 978-0-387-88697-8

Published June 2009

Material on this web page
Answers to Selected Exercises Data Sets
R Scripts Known Errata

Yearly global mean temperature and ocean levels, daily share prices, and the signals transmitted back to Earth by the Voyager space craft are all examples of sequential observations over time known as time series. This book gives you a step-by-step introduction to analysing time series using the open source software R, which can be downloaded free of charge from: http://www.r-project.org.

Each time series model is motivated with practical applications, and is defined in mathematical notation. Once the model has been introduced it is used to generate synthetic data, using R code, and these generated data are then used to estimate its parameters. This sequence enhances understanding of both the model and the R function used to fit the model to data. Finally, the model is applied to an observed series of data. By using R, the whole procedure can be reproduced by the reader.

The book is written for undergraduate students of mathematics, economics, business and finance, geography, engineering and related disciplines, and postgraduate students who may need to analyse time series as part of their taught programme or their research.

Paul Cowpertwait (paul.cowpertwait@aut.ac.nz) is an associate professor in analytics at Auckland University of Technology with a substantial research record in both the theory and applications of time series and stochastic models. Andrew Metcalfe (andrew.metcalfe@adelaide.edu.au) is an associate professor in the School of Mathematical Sciences at the University of Adelaide, and an author of six statistics textbooks and numerous research papers. Both authors have extensive experience of teaching time series to students at all levels.

### Contents

 Time Series Data Correlation Forecasting Strategies Basic Stochastic Models Regression Stationary Models Non-stationary Models Long Memory Processes Spectral Analysis System Identification Multivariate Models State Space Models

### Data Sets

Data listed here are for teaching/research only and can be downloaded free of charge from various sites via the internet. The sources are various, including R, the Climatic Research Unit (University of East Anglia), Rob Hyndman's Time Series library, the Pacific Exchange Rate Service, the United Nations Framework Convention on Climate Change, and the Australian Bureaux of Statistics. We are grateful to these organisations and people for making their data available. Please let us know if you find your data here without a suitable acknowledgement. The chapter in which the data set first appears is shown first.

 Chapter 1: Chocolate, Beer, Electricity Chapter 1: Exchange rate (\$NZ per UK pound) Chapter 1: Maine unemployment Chapter 1: US unemployment Chapter 1: Global temperature data (edited) Chapter 2: Herald square exhaust emission data Chapter 2: Wave tank data Chapter 2: Font reservoir series Chapter 2: Guess What? Chapter 2: Varnish Chapter 3: Building Approvals Chapter 3: Complaints to a motor company Chapter 3: Australian wine sales Chapter 4: Hewlett-Packade closing prices Chapter 7: Southern temperatures Chapter 7: Overseas visitors Chapter 7: Stockmarket series Chapter 8: LAN series Chapter 8: Nile Minima Chapter 8: Bank loan rates Chapter 9: Electric motor series Chapter 9: Vibration dose series Chapter 9: Southern oscillation index Chapter 9: Pacific Decadal Oscillation index Chapter 10: Tugboat data Chapter 11: US exchange rates Chapter 12: Murray River data Chapter 12: Morgan Stanley share prices

### R Scripts

The longer R scripts that appear in the text are available in the link below.