Time Series and Forecasting
Preface
Readings
Acknowledgements
I Introduction and Overview
1
Introduction
1.1
Course introduction
1.2
The project
1.3
Computing setup
1.4
Other helpful resources
2
A very simple time series analysis
2.1
Steps in a very simple time series statistical analysis
2.2
Example problem: Estimating the probability of a weather event
2.2.1
1. State your question
2.2.2
2. Acquire data and background information
2.2.3
3. Organize your data
2.2.4
4. Perform exploratory analysis of your data
2.2.5
5. Write down your model of the data generating process
2.2.6
6. If necessary: transform the model and data to make it ready for analysis
2.2.7
7. Choose an appropriate technique for estimating model parameters, consistent with your assumptions about your data generating process
2.2.8
8. Estimate model parameters
2.2.9
9. Confirm that your modeling assumptions are satisfied
2.2.10
10. compute measures of model quality; confirm that your model is good enough for your purpose
2.2.11
11. Use your calibrated model to address your original question.
2.3
For next time: Add a covariate
3
Computing setup and guide
3.1
The R programming language, and related resources
3.2
Git and Github
3.3
Markdown and R Markdown
3.4
Bibliographic resources: Zotero and Bibtex
3.5
General course web resources
4
Finding and acquiring a dataset for your project
4.1
Appropriate data sets for time series analysis
II Data Wrangling
5
Data extraction, transformation, and loading: Overview
5.1
ETL strategy: Design your end-point data table(s)
5.1.1
Design your end point first (at least, in your head).
5.1.2
Typical structure for a time series data table:
6
Data extraction
6.1
Data types
6.2
Time indexing in data
7
Data extraction
7.1
Reading in data from source files
7.1.1
Example using readr::read_csv
8
Data transformation
9
Running diagnostics on your tsibble
9.1
Duplicate values
9.2
Missing values
9.3
Irregular time intervals
10
Data cleaning
10.1
Dropping empty rows and columns
11
Saving and loading data files
11.1
Fast file reading and writing: The
arrow
package
III Exploratory Data Analysis
12
Exploratory data analysis: Overview
13
Exploratory analysis of time series data: Examples
13.1
Example: Monthly electricity sales for Virginia
13.1.1
Extract data from remote database
13.1.2
Briefly characterize the dataset
13.1.3
Plot the time series
13.1.4
Convert the data frame into a time series
tsibble
object
13.1.5
Make some plots
13.1.6
Scatterplots
13.2
Example: Australian production
13.3
Example: Gross Domestic Product data
13.3.1
Exploratory data analysis
13.3.2
Fitting data to simple models
13.3.3
Work with ln(GDP)
13.4
Producing forecasts
13.4.1
Model residuals vs. forecast errors
13.4.2
Are the model residuals auto-correlated?
13.5
Example: GDP, several countries
13.5.1
Plot lagged values
IV Modeling the data-generating process
14
The normal linear model
14.1
Assumptions of the linear model
14.2
Examples of the normal linear model
15
Ordinary least squares estimation
References
Appendix
A
Course Syllabus
A.1
Course Description
A.1.1
Prerequisites
A.1.2
Expectations
A.1.3
Readings
A.1.4
Course Objectives
A.1.5
Grading Policy
A.1.6
Attendance Policy
A.1.7
Communications protocols, including emails and office hours
A.1.8
Academic Dishonesty Policy
A.1.9
Disabilities Policy
B
Assignment: Extract, Transform, and Load Your Data
B.1
Overview: Extraction, transformation, and loading of data
B.2
Step 1: Identify a time series data set you want to work with
B.3
Step 2: Acquire the data from its source location, reproducibly
B.4
Step 3 Organize your data into a
tidy
data frame
B.5
Step 4: Convert your data into a
tsibble
object
B.6
Step 5: Generate at least one table or figure
B.7
Additional resources and next steps
Announcement: One more week to revise & resubmit data ETL assignment
B.8
References
C
Assignment: Project Proposal
C.1
Introduction
C.2
The data and the data-generating process
C.3
Exploratory data analysis
C.4
Plot the time series.
C.5
Perform and report the results of other exploratory data analysis
C.6
Example: Gross Domestic Product data
C.6.1
Exploratory data analysis
C.6.2
Fitting data to simple models
C.6.3
Work with ln(GDP)
C.7
Producing forecasts
C.8
Model residuals vs. forecast errors
C.9
Are the model residuals auto-correlated?
C.10
Example: GDP, several models, several countries
C.11
Statistical model
C.11.1
Formal model of data-generating process
C.11.2
Discussion of the statistical model
C.12
Plan for data analysis
C.13
Submission requirements
C.14
Comment
C.15
References
Published with bookdown
Time Series and Forecasting
References