forecast

forecast package for R

Github星跟踪图

forecast

Travis-CI Build Status
CRAN_Status_Badge
cran checks
Lifecycle: retired
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.

This package is now retired in favour of the fable package. The forecast package will remain in its current state, and maintained with bug fixes only. For the latest features and development, we recommend forecasting with the fable package.

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.

主要指标

概览
名称与所有者robjhyndman/forecast
主编程语言R
编程语言R (语言数: 6)
平台
许可证
所有者活动
创建于2012-04-22 23:19:09
推送于2025-05-26 23:04:45
最后一次提交2025-05-27 08:56:21
发布数42
最新版本名称v8.24.0 (发布于 )
第一版名称v4.7 (发布于 )
用户参与
星数1.1k
关注者数81
派生数341
提交数2.5k
已启用问题?
问题数642
打开的问题数13
拉请求数310
打开的拉请求数0
关闭的拉请求数33
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?