SlideShare a Scribd company logo
Intro to Forecasting in R
Part 3
Houston R Users Group
Ed Goodwin, CFA
The story so far…
• time series classes in R
• simple and naive forecasts
• simple linear regressions
• dummy variables
• data transformations
One more transformation
using scale( )
Use the scale function to scale
two different matrices. Scale
uses the formula (x-mean(x))/
sd(x) to make all data sets on
same scale.
You can use arguments to set
the whether you center on 0 or
not and whether to scale by a
certain numeric amount or
default to standard deviation
Example of Scale in Action
• Monthly time series
of pigs slaughtered
• Monthly time series
of pounds of milk
produced
Unscaled Plot
Scaling code
Scaled plot
Stationarity
Stationarity is a measure of how much a point in a time
series is dependent on prior points in the time series. You
must know if your data is stationary (or non-stationary) in
order to determine how to forecast.
Certain models only work on stationary time series (e.g.
ARIMA)
Stationarity - Examples
Non-Stationary Stationary
Use the acf( ) function
Use acf( ) to generate an auto correlation
plot to analyze stationarity
Use the acf( ) function
Use acf( ) to generate an auto correlation
plot to analyze stationarity
Decomposing the AirPassengers Data Series
It’s easy…just use the
decompose( ) function
type can be additive or multiplicative
Exponential Smoothing
Using Holt-Winters
Holt-Winters is a seasonal trend forecasting model. It is
a simple exponential smoothing model. This means that
it predicts the future based on a set of smoothed average
observations about the past, accounting for trend and
seasonal variations.
Holt-Winters
Use the hw( ) function.
Holt-Winters Forecast of
Air Passengers

More Related Content

PDF
Hrug intro to forecasting
PDF
Intro To Forecasting - Part 2 - HRUG
PPT
2nd Test - Scatterplots
PPT
Time Series Analysis - Modeling and Forecasting
PPTX
Scatter Diagram
PDF
Data Science - Part X - Time Series Forecasting
PPTX
Time series Forecasting
PPT
Control charts[1]
Hrug intro to forecasting
Intro To Forecasting - Part 2 - HRUG
2nd Test - Scatterplots
Time Series Analysis - Modeling and Forecasting
Scatter Diagram
Data Science - Part X - Time Series Forecasting
Time series Forecasting
Control charts[1]

What's hot (20)

PPT
Latihan Carta Kawalan
PPT
Sta2023 ch02
PDF
Demand time series analysis and forecasting
PDF
Sales forecasting of an airline company using time series analysis (1) (1)
PPTX
Sales Data Forecasting for Airline
PDF
Exponential smoothing
PDF
Seven QC Tools Training; Control Charts (Mean Chart and Range Chart)
PPT
Adj Exp Smoothing
PPT
Presentation 4
PPT
Time Series Analysis - Modeling and Forecasting
PPTX
Q-Q Plot | Statistics
PDF
Probabilistic data structures
PPTX
Data structures1
PDF
Control Charts for variables Xbar and R chart and attributes P, nP, C, and u ...
PDF
Quantile Quantile Plot qq plot
PPTX
Variable control chart
PPTX
Trend adjusted exponential smoothing forecasting metho ds
PDF
X Bar And S Charts Mini Tutorial
DOCX
Iso 9001 quality manual
PPTX
Data Analysis project "TITANIC SURVIVAL"
Latihan Carta Kawalan
Sta2023 ch02
Demand time series analysis and forecasting
Sales forecasting of an airline company using time series analysis (1) (1)
Sales Data Forecasting for Airline
Exponential smoothing
Seven QC Tools Training; Control Charts (Mean Chart and Range Chart)
Adj Exp Smoothing
Presentation 4
Time Series Analysis - Modeling and Forecasting
Q-Q Plot | Statistics
Probabilistic data structures
Data structures1
Control Charts for variables Xbar and R chart and attributes P, nP, C, and u ...
Quantile Quantile Plot qq plot
Variable control chart
Trend adjusted exponential smoothing forecasting metho ds
X Bar And S Charts Mini Tutorial
Iso 9001 quality manual
Data Analysis project "TITANIC SURVIVAL"
Ad

Similar to Intro to Forecasting - Part 3 - HRUG (20)

PDF
prediction of_inventory_management
 
PDF
Holtwinters terakhir lengkap
PDF
Intro to Forecasting in R - Part 4
PDF
lecture3.pdf
PPTX
Time Series Analysis - 2 | Time Series in R | ARIMA Model Forecasting | Data ...
PPTX
Time series data analysis - Introduction to
PPTX
Time series analysis
PDF
timeseries cheat sheet with example code for R
PPTX
Presentation On Time Series Analysis in Mechine Learning
PPTX
What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...
PPT
Lesson08_static11
PDF
Forecasting Techniques - Data Science SG
PPT
Lesson08_new
DOCX
IST 230 Exercise on Forecasting RecurrencesUse Excel or OpenO.docx
DOCX
Chapter 7 Forecasting Time Series ModelsLan WangCSU East .docx
PDF
Lecture_18 hypothesis testing and probability
PDF
Mastering Time Series Forecasting - Guide to Techniques, Applications, and Fu...
PPTX
Time Series Analysis and Forecasting in Practice
PPTX
forecasting.pptx
prediction of_inventory_management
 
Holtwinters terakhir lengkap
Intro to Forecasting in R - Part 4
lecture3.pdf
Time Series Analysis - 2 | Time Series in R | ARIMA Model Forecasting | Data ...
Time series data analysis - Introduction to
Time series analysis
timeseries cheat sheet with example code for R
Presentation On Time Series Analysis in Mechine Learning
What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...
Lesson08_static11
Forecasting Techniques - Data Science SG
Lesson08_new
IST 230 Exercise on Forecasting RecurrencesUse Excel or OpenO.docx
Chapter 7 Forecasting Time Series ModelsLan WangCSU East .docx
Lecture_18 hypothesis testing and probability
Mastering Time Series Forecasting - Guide to Techniques, Applications, and Fu...
Time Series Analysis and Forecasting in Practice
forecasting.pptx
Ad

More from egoodwintx (9)

PDF
HRUG - Linear regression with R
PDF
Scaling in R
PDF
Boardgamegeek scraping
PDF
HRUG - Text Mining to Construct Causal Models
PDF
Collaborative Package Development in R
PDF
Unit Testing in R with Testthat - HRUG
PDF
Intro to RStudio
PDF
Fantasy Football Draft Optimization in R - HRUG
PDF
Eag 201110-hrugregexpresentation-111006104128-phpapp02
HRUG - Linear regression with R
Scaling in R
Boardgamegeek scraping
HRUG - Text Mining to Construct Causal Models
Collaborative Package Development in R
Unit Testing in R with Testthat - HRUG
Intro to RStudio
Fantasy Football Draft Optimization in R - HRUG
Eag 201110-hrugregexpresentation-111006104128-phpapp02

Recently uploaded (20)

PPT
Quality review (1)_presentation of this 21
PPTX
Supervised vs unsupervised machine learning algorithms
PDF
Clinical guidelines as a resource for EBP(1).pdf
PPTX
IB Computer Science - Internal Assessment.pptx
PPTX
Database Infoormation System (DBIS).pptx
PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
PDF
.pdf is not working space design for the following data for the following dat...
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PPTX
STUDY DESIGN details- Lt Col Maksud (21).pptx
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PDF
Mega Projects Data Mega Projects Data
PPTX
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
PPTX
Introduction to Knowledge Engineering Part 1
PPTX
Major-Components-ofNKJNNKNKNKNKronment.pptx
PDF
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
PPTX
IBA_Chapter_11_Slides_Final_Accessible.pptx
PPTX
1_Introduction to advance data techniques.pptx
Quality review (1)_presentation of this 21
Supervised vs unsupervised machine learning algorithms
Clinical guidelines as a resource for EBP(1).pdf
IB Computer Science - Internal Assessment.pptx
Database Infoormation System (DBIS).pptx
Data_Analytics_and_PowerBI_Presentation.pptx
.pdf is not working space design for the following data for the following dat...
Introduction-to-Cloud-ComputingFinal.pptx
STUDY DESIGN details- Lt Col Maksud (21).pptx
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
Mega Projects Data Mega Projects Data
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
Introduction to Knowledge Engineering Part 1
Major-Components-ofNKJNNKNKNKNKronment.pptx
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
IBA_Chapter_11_Slides_Final_Accessible.pptx
1_Introduction to advance data techniques.pptx

Intro to Forecasting - Part 3 - HRUG