18Time Series
Time series data are vectors of numbers, typically regularly spaced in time. Yearly counts of animals, daily prices of shares, monthly means of temperature, and minute‐by‐minute details of blood pressure are all examples of time series, but they are measured on different time scales. Sometimes the interest is in the time series itself (e.g. whether or not it is cyclic, or how well the data fit a particular theoretical model), and sometimes the time series is incidental to a designed experiment (e.g. repeated measures). We cover each of these cases in turn.
Three key concepts in time series analysis are
- trend;
- serial dependence; and
- stationarity.
Many time series analyses assume that the data are untrended. If they do show a consistent upward or downward trend, then they can be detrended before analysis (e.g. by differencing). Serial dependence arises because the values of adjacent members of a time series may well be connected, as one might expect in all the examples listed above. Stationarity is a technical concept, but it can be thought of simply as meaning that the time series has the same properties wherever we start looking at it and is an assumption made in many models (after the trend has been removed). We will have a look at some examples that cover many common themes of time series before returning to the theory in a little more detail with an example. Finally, we look at simulating time series. A longer introduction to using with time series can be ...
Get The R Book, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.