Statistics 469

Applied Time Series

& Forecasting

 

Fall 2006


 

 

Scott D. Grimshaw

Professor, Statistics Department

230 TMCB

801-422-6251

grimshaw@byu.edu

 

Office Hours: TTh 1:30-2:30 pm or by appt.

 

Course Lectures: MWF 11-11:50 pm in 299 TMCB

 

TA: Wendy Bunn, 225 TMCB

TA Office Hours: F 12:30-1:30 pm

 

Announcements

 

 

 

Objectives

Course Catalog Description:

Data mining, univariate ARIMA time series theory and application, seasonal models, spatial correlation models, conditional heteroscedastic models in financial time series, case studies.

 

Prerequisites:

STAT 336 (a good regression course covering y=xb+e where e is iid N(0,sigma))

 

Course Goals:

  • Discuss fundamentals of good model building.
  • Investigate effect of correlated data on analysis.
  • Learn about time domain models.
  • Introduce ARIMA models.
  • Learn about frequency domain models.
  • Produce a documented report of a predictive model.
  • Make a presentation of a predictive model.

 

Course Materials

Textbook: Time Series Analysis and Its Applications With R Examples (2nd ed) by Robert H. Shumway and David S. Stoffer

 

Book Web Page

Data Sets

R Code Used in Book

 

Some R syntax:

  • Create a time series object:
jj <- scan("/mydata/jj.dat") 
jj <- ts(jj,start=1960, frequency=4)
plot(jj, ylab="Quarterly Earnings per Share")
  • Create a time series plot:
w <- rnorm(500,0,1) # 500 N(0,1) variates
plot.ts(w)
  • Exploratory Data Analysis finding trend and seasonality
mort <- scan("/mydata/cmort.dat")
ts.plot(mort)
n <- length(mort)
lines(ksmooth(1:n, mort, "normal", bandwidth=5))
lines(ksmooth(1:n, mort, "normal", bandwidth=104))
  • Possible Transformations
Lag: lag(x)
Natural log: log(x)
Exponent: exp(x)
Difference: diff(x)
s th Difference: diff(x,s)
  • Fit an ARIMA(p,d,q)x(P,D,Q)_s
out <- arima(x,order=c(p,d,q),seasonal=list(order=c(P,D,Q), period=s))
  • ARIMA model diagnostics
tsdiag(out, gof.lag=15)
  • Predictions
prod.pr <- predict(out, n.ahead=12)
U <- prod.pr$pred + 2*prod.pr$se
L <- prod.pr$pred - 2*prod.pr$se
# to only plot the last few observations of the GNP Prod series
month=337:372
plot(month,prod[month],type="o",xlim=c(337,384),ylim=c(100,180),ylab="Production")
lines(prod.pr$pred, col="red", type="o")
lines(U, col="blue", lty="dashed")
lines(L, col="blue", lty="dashed")
abline(v=372.5,lty="dotted")

 

 

Grading

25% Homework

25% Midterm Exam

25% Project

25% Final Exam Tuesday Dec 19 11-2 in 244 and 250 TMCB

 

Tentative Outline of Material and Reading Assignments

 

Predictive Models (Purpose, Documentation, Presentation)

Chapter 1: Characteristics of Time Series

Chapter 2: Time Series Regression & Exploratory Data Analysis

Chapter 3: ARIMA Models

Chapter 4: Spectral Analysis and Filtering

Chapter 5: Additional Time Domain Topics

 

Section 5.3 GARCH Models

 

Section 5.5 Regression with Autocorrelated Errors

Data Mining

 

Regression Models

 

Logistic Regression Models

 

Variable Selection

 

 

Homework

Turn in to the TA (225 TMCB) by 5:00 pm on Due Date.

Half Credit for Late Assignments turned in before the next class period.

No Credit after that.

 

Due Monday 11 Sep

# 1.1, 1.2, 1.3

 

Due Monday 18 Sep

# 1.4, 1.5, 1.6(ab), 1.7, 1.8, 1.11(a), 1.15

 

Due Monday 25 Sep

#1.19, 1.20, 1.21, 1.22, 2.1, 2.3

 

Due Monday 2 Oct

#2.8(abc), 2.9(ab), 2.10(ab), 2.12

 

Due Monday 23 Oct

#3.3, 3.4 (this one is hard, so use the 30 minute rule), 3.5 (use the ARMAacf function), 3.6 (use the ARMAtoMA function to get the psi-weights and the ARMAacf function to get the rho(h) values), 3.8

 

Due Monday 30 Oct

#3.17

 

Due Monday 6 Nov

Simulation Study Report

 

Due Monday 13 Nov

#

 

Due Monday 27 Nov

 

Project

Identify Topic (approx one page summary due Wednesday 4 Oct)

  • Problem Statement paragraph should define the response variable and explain how a predictive model for this quantity would be useful.
  • Data paragraph should define the columns of the database, the source of the data, expected number of observations.
  • Analysis paragraph should define the anticipated statistical modeling methodology (for example, time series model, regression model, logistic regression model).

Gather Data (approx two page summary due Wednesday 8 Nov)

  • Paragraph reporting the source(s), number of observations, and time period. Justify why this period of data is representative of future observations. Explain any filters applied to eliminate some observations.
  • Table reporting summary statistics for all variables (response and explanatory). For categorical variables report possible values and frequencies. For numerical variables report five-number summary and number of missing observations.

 

Due 4 pm Wednesday 20 Dec

Report

  1. Problem Statement
  2. Data Source, justification, time period, filters applied
  3. Summary Statistics
  4. Model procedure, justification of approach, results, interpretation
  5. Validation (compare observed and predicted)
  6. Forecast/Predictions (relating to problem statement)

Poster

  • If you were to make a presentation, what would the audience be interested in?
  • For example:
    • Problem Statement
    • Why the data is relevant to build model
    • Outline of Modeling Approach (philosophy, with only necessary technical details)
    • Model with graphs demonstrating interesting features or effects
    • Validation Results
    • Some interesting predictions/forecasts

 

Data Sets

For Treasury Maturity Rates, US$ Exchange Rates, CPI:

FRED database from Economic Research Division, Federal Reserve Bank of St. Louis.

 

B&E DataLinks provides links to economic and financial data sources. Sponsored by the Business and Economics Statistics Section of the American Statistical Association.

 

Econometrics Journal data links

 

Class Examples and Code

GARCH for Stock Returns (sas)

 

Other Stuff

American Statistical Association

ASA Career Center

COPSS Careers in Statistics

AmStat Special Careers Issues

September 2002

September 2001

September 2000

Applying for a Job: Your Curriculum Vitae and Cover Letter

ASA JobWeb

ASA Internship Opportunities for 2003

 .

 

Preventing Sexual Harassment

Title IX of the Education Amendments of 1972 prohibits sex discrimination against any participant in an educational program or activity that receives federal funds. The act is intended to eliminate sex discrimination in education. Title IX covers discrimination in programs, admissions, activities, and student-to-student sexual harassment. BYU's policy against sexual harassment extends not only to employees of the University but to students as well. If you encounter unlawful sexual harassment or gender-based discrimination, please talk to your professor; contact the BYU Equal Employment Opportunity Office at 422-5895; or contact the Honor Code Office at 422-2847.

 

In Case of Emergency

Please follow instructor’s instructions:

  • If there is an evacuation alarm exit the classroom in an orderly fashion and exit the Talmage Building and gather in the west parking lot.
  • After all students have evacuated the building you should then report to your BYU ward assembly area. (If you do not know where this is, contact your Bishop.)

 

Students with Disabilities

Brigham Young University is committed to providing a working and learning atmosphere that reasonably accommodates qualified persons with disabilities. If you have any disability that may impair your completing this course successfully, please contact the University Accessibility Center (422-2767). Reasonable academic accommodations are reviewed for all students who have qualified documented disabilities. Services are coordinated with the student and instructor by the UAC. If you need assistance or if you feel you have been unlawfully discriminated against on the basis of disability, you may seek resolution through established grievance policy and procedures. You may contact the Equal Employment Office at 422-5895, D-282 ASB.

 

Complaints

I have done my best to design a course that will accomplish course objectives while recognizing the workload of a three credit hour class. If you have any concerns regarding any aspect of this course (content, workload, evaluation, etc), please come and discuss these matters with me. If we cannot come to a mutually agreeable solution, I will direct you to my superiors.