• Stars
    star
    1,097
  • Rank 40,599 (Top 0.9 %)
  • Language
    R
  • Created about 12 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Forecasting Functions for Time Series and Linear Models

forecast

R-CMD-check CRAN_Status_Badge Downloads Licence

The R package forecast provides methods and tools for displaying and analysing univariate time series forecasts including exponential smoothing via state space models and automatic ARIMA modelling.

A complementary forecasting package is the fable package, which implements many of the same models but in a tidyverse framework.

Installation

You can install the stable version from CRAN.

install.packages('forecast', dependencies = TRUE)

You can install the development version from Github

# install.packages("remotes")
remotes::install_github("robjhyndman/forecast")

Usage

library(forecast)
library(ggplot2)

# ETS forecasts
USAccDeaths %>%
  ets() %>%
  forecast() %>%
  autoplot()

# Automatic ARIMA forecasts
WWWusage %>%
  auto.arima() %>%
  forecast(h=20) %>%
  autoplot()

# ARFIMA forecasts
library(fracdiff)
x <- fracdiff.sim( 100, ma=-.4, d=.3)$series
arfima(x) %>%
  forecast(h=30) %>%
  autoplot()

# Forecasting with STL
USAccDeaths %>%
  stlm(modelfunction=ar) %>%
  forecast(h=36) %>%
  autoplot()

AirPassengers %>%
  stlf(lambda=0) %>%
  autoplot()

USAccDeaths %>%
  stl(s.window='periodic') %>%
  forecast() %>%
  autoplot()

# TBATS forecasts
USAccDeaths %>%
  tbats() %>%
  forecast() %>%
  autoplot()

taylor %>%
  tbats() %>%
  forecast() %>%
  autoplot()

For more information

License

This package is free and open source software, licensed under GPL-3.

More Repositories

1

tsfeatures

Time series features
R
246
star
2

ETC3550Slides

Slides for a forecasting course based on "Forecasting: Principles and Practice"
R
165
star
3

fpp3package

All data sets required for the examples and exercises in the book "Forecasting: principles and practice" (3rd ed, 2020) by Rob J Hyndman and George Athanasopoulos <http://OTexts.org/fpp3/>. All packages required to run the examples are also loaded.
R
126
star
4

anomalous-acm

Anomalous time series package for R (ACM)
R
118
star
5

M4metalearning

R
111
star
6

fpp2-package

All data sets required for the examples and exercises in the book "Forecasting: principles and practice" (2nd ed, 2018) by Rob J Hyndman and George Athanasopoulos <http://OTexts.org/fpp2/>. All packages required to run the examples are also loaded.
R
106
star
7

anomalous

Anomalous time series package for R
R
92
star
8

CV

RJH Curriculum Vitae
TeX
81
star
9

cricketdata

International cricket data for men and women, Tests, ODIs and T20s
R
77
star
10

MonashEBSTemplates

Rmarkdown templates for use at Monash University Department of Econometrics and Business Statistics
TeX
74
star
11

MonashThesis

Monash PhD thesis template
TeX
68
star
12

demography

demography package for R
R
65
star
13

MEFM-package

R package to implement the MEFM
R
53
star
14

ctv-TimeSeries

git mirror of CRAN Task View Time Series files
R
47
star
15

thief

Temporal HIErarchical Forecasting
R
44
star
16

Half-day-forecasting-workshop

Forecasting workshop for ACEMS 2018
TeX
37
star
17

fpp3_slides

Slides to accompany Forecasting: Principles and Practice, 3rd edition
R
32
star
18

ETC3580

Teaching materials for ETC3580
TeX
21
star
19

hdrcde

Highest density regions and conditional density estimation
R
20
star
20

ForecastingWorkshop

Slides for 3-day forecasting workshop
HTML
19
star
21

tscompdata

Time series competition data
R
18
star
22

forecasting_workshop

R
17
star
23

quantile_ensemble_talk

Ensemble forecasts with fable for NYCR conference
TeX
16
star
24

ResearchHabits

Talk to honours students on developing good research habits
TeX
16
star
25

quantile_ensembles

Book chapter on computing quantile forecasts for ensembles
TeX
15
star
26

tidylife

Tidy Analysis Tools for Mortality, Fertility, Migration and Population Data
R
15
star
27

fma

Data sets from "Forecasting: methods and applications" by Makridakis, Wheelwright & Hyndman (1998)
R
15
star
28

Rcademy

TeX
14
star
29

STR_paper

Article by Dokumentov & Hyndman on Seasonal Trend decomposition using Regression
TeX
14
star
30

Mcomp

Data from the M-competitions
R
12
star
31

expsmooth

Data sets from the book "Forecasting with exponential smoothing: the state space approach" by Hyndman, Koehler, Ord and Snyder (Springer, 2008).
HTML
12
star
32

quarto_website_template

Template of quarto website
HTML
11
star
33

fbtsa

Talk on feature-based time series analysis using R
TeX
11
star
34

fpp3scripts

R scripts used in fpp3 book
R
11
star
35

ozbabynames

Australian baby names data
R
10
star
36

highdimts

Talk on high-dimensional time series analysis
TeX
9
star
37

reconciliation_review_talk

TeX
9
star
38

ISI_Workshop_2019

Materials for 1-day workshop on high dimensional time series analysis at ISI 2019
TeX
9
star
39

complex_seasonality_talk

HTML
9
star
40

robjhyndman.com

Quarto source files for robjhyndman.com
HTML
8
star
41

uncertain_futures

Talk for ACEMS and SSA
R
8
star
42

Writing-seminar

Academic writing for different audiences
TeX
8
star
43

linear-hierarchical-forecasting

Paper on linear hierarchical forecasting
TeX
8
star
44

funtsibble

R package for functional time series based on tsibbles
R
7
star
45

Rmarkdown2020

Talk for Rstudio conf
TeX
7
star
46

fable-talk-2018

Talk on tidy forecasting using the fable package
TeX
7
star
47

weird-package

All data and functions needed for the book "That's weird: anomaly detection using R" by Rob J Hyndman <https://OTexts.com/weird>
R
6
star
48

Researchplus

TeX
6
star
49

feasts-talk

Talk on time series features, July 2019
TeX
6
star
50

time_series_workshop

Workshop on "Exploratory time series analysis using R"
R
6
star
51

fem-talk

Talk on Hierarchical time series forecasting for emergency services
R
6
star
52

covidtalk

Probabilistic ensemble forecasting of Australian COVID-19 cases
R
5
star
53

tsdensities

Paper on estimating a time series of densities
TeX
5
star
54

fforma-talk

Talk about Feature-based Forecasting
TeX
4
star
55

addb

Australian Demographic Data Base
R
4
star
56

history_forecasting_competitions

IJF paper on history of forecasting competitions
TeX
4
star
57

fr_iif

IIF Lectures on forecast reconciliation, 2023
TeX
4
star
58

geometry_reconciliation

Talk on the geometry of forecast reconciliation
R
4
star
59

combinations_talk

HTML
3
star
60

eechidnaPaper

Paper to describe the eechidna R package
TeX
3
star
61

forecasting-competitions

Talk on Forecasting Competitions
TeX
3
star
62

ftsviz

Data visualization for functional time series
R
3
star
63

tidyverts2021

Talk on tidyverts packages
R
3
star
64

quarto-talk-template

TeX
3
star
65

fsg_talk

Creating social good for forecasters
HTML
2
star
66

pkgmeta

Find details about my R packages
R
2
star
67

Research_summary

Annual summary of my research for NUMBAT seminar
TeX
2
star
68

compenginets

Time series data from http://www.comp-engine.org/
R
2
star
69

fforma-paper

IJF invited paper on FFORMA applied to M4 data
TeX
2
star
70

pension_age_talk

Seminar on determining a sustainable pension age
R
2
star
71

non-negative-mint

Paper on non-negative reconciliation
TeX
1
star
72

ISF_Panel_2019

Slides for final panel session at ISF2019
TeX
1
star
73

hprtc-quarto

Quarto version of HPRTC website
JavaScript
1
star
74

paperpile

TeX
1
star
75

gratis-talk

Talk about gratis package
TeX
1
star
76

MonashLaTeXThesis

TeX
1
star
77

TACforecasting

R package for forecasting for the Victorian Transport Accident Commission
R
1
star
78

DOJ_lookup

Shiny app to look up Victorian Department of Justice region from postcode or locality
R
1
star
79

robjhyndman

Personal readme
1
star
80

ISI_talk_2019

Invited talk for ISI-WSC 2019 in Kuala Lumpur
TeX
1
star
81

fable_meetup_2019

Talk on fable for Uni of Cardiff
TeX
1
star