time series. learning objectives cross-sectional vs. longitudinal describe what is forecasting...

Post on 02-Jan-2016

217 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Time Series

Learning Objectives

•Cross-sectional vs. Longitudinal•Describe what is forecasting•Explain time series & its components•Smooth a data series•Moving average• Exponential smoothing

•Forecast using trend models • Simple Linear Regression • Auto-regressive

Cross-Sectional: Many Variables, One-Time

Longitudinal: Measurements over Time

No

YesNo

Yes

Longitudinal

Cro

ss-S

ecti

onal PEW Mobile Phone

Galton Children Height

Tracking Studies

Census

Stock Market

Historical River Levels

Old Faithful

Web Analytics

Titanic Survivors

Forecasting: Qualitative Data

•Used when situation is vague & little data exist• New products• New technology

• Involve intuition, experience• “Expert” Opinion•Directional: Up / Down•Uncertainty

•Used when situation is ‘stable’ & historical data exist•Mature Market

•Mathematical techniques• Set of evenly spaced numerical data

• Obtained by observing response variable at regular time periods

• Forecast based only on past values• Assumes that factors influencing past, present, & future will continue

Forecasting: Quantitative Methods

Time Series Components

1. Trend2. Cyclical3. Seasonal

A. WeatherB. Customs

4. Event-Based

Time Series Forecasting

Time Series

Moving Average

Smoothing

ExponentialSmoothing

Trend Analysis

Auto-Regressive

Linear Exponential

Quadratic

• Upward or Downward Swings• May Vary in Length• Usually Lasts 2 - 10 Years

Outcome

Time

Cycle

Cyclical Component

• Regular pattern of up & down fluctuations• Weather• Customs etc.

• Retail Sales

Seasonal Component

Moving Average Method

• Series of arithmetic means • Used for smoothing• Provides overall impression of data over time

hist(beer,prob=T,col="red")lines(density(beer),lwd=2)

beer<-read.csv("beer.csv",header=T,dec=",",sep=";")beer<-ts(beer[,1],start=1956,freq=12)plot(beer,type="l")

plot(stl(beer,s.window="periodic"))

Exponential Smoothing Method

• Form of weighted moving average• Weights decline exponentially• Most recent data weighted most

• Requires smoothing constant (W)• Ranges from 0 to 1• Subjectively chosen

• Involves little record keeping of past data

# Holt-Winters exponential smoothing with trend # and additive seasonal component.beer.hw<-HoltWinters(beer)predict(beer.hw,n.ahead=12)plot(beer,xlim=c(1956,1999))lines(predict(beer.hw,n.ahead=48),col=2)

Summary

• Described what forecasting is• Explained time series & its components• Smoothed a data series

• Moving average• Exponential smoothing

• Forecasted using trend models

top related