STAT 451, Day 16

Time Series Data

Time Series Data

When working with Time Series Data it is useful to consider if the time measurement is quantitative discrete or quantitative continuous.

  • Discrete Time Series Data are collected at specific points in time on a regular basis.
  • Continuous Time Series Data is sampled, usually at regular intervals, over time, from a continuous source.

Discrete Time Series Data

Discrete Time Series Data is often presented using bar graphs where the x-axis is time.

Sometimes stacked bar graphs are used to subset the data within the time period, day/month/year.

This is how graphs are often presented in the Wall Street Journal and other newspapers.

Continuous Time Series Data

Continuous Time Series Data is often presented using time plots where the x-axis is time.

Sometimes multiple time series are presented on a sigle time plot. Sometimes with different scales, right and left.

The dots are connected!

This is how graphs are often presented in the Wall Street Journal and other newspapers.

Examples

Which of these websites have time series data visualizations?

The Humanitarian Data Exchange HDX

Gallop gallop

Federal Reserve Bank of St. Lewis Economic Research FRED

Geographic Economic Data GeoFRED

Time Series

What do we look for in time series data?

  • trends
  • cyclical patterns
  • seasonal patterns
  • irregularity (error, white noise)
  • homoskedasticity (stationarity)
  • heteroskedasticity (transformation, log)

Time Series

Basic models

  • Additive model \[ Y_t = T_t + S_t + I_t \]

  • Multiplicative model \[ Y_t = T_t*S_t*I_t \]

What would a log transformation do to the multiplicative model?

Time Series

In R

decompose()

or

stl()

Time Series

What is autocorrelation?

What is crosscorelation?

Time Series

What is an autoregression model?

Time Series Books online

ASTSA Package

From Shumway and Stoffer

library(astsa)
ts.plot(jj, type= 'o', main = "Quarterly Earnings per Share, Johnson & Johnson")

plot of chunk unnamed-chunk-3

ASTSA

ts.plot(log(jj), type='o',"Quarterly Log-Earnings per Share, J & J")

plot of chunk unnamed-chunk-4