Skip to content

forecast

Forecasting Functions for Time Series and Linear Models

v9.0.2 · Mar 17, 2026 · GPL-3

Description

Methods and tools for displaying and analysing univariate time series forecasts including exponential smoothing via state space models and automatic ARIMA modelling.

Downloads

492.1K

Last 30 days

124th

1.4M

Last 90 days

3.1M

Last year

Trend: +7.5% (30d vs prior 30d)

CRAN Check Status

1 ERROR
6 NOTE
7 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang NOTE
r-devel-linux-x86_64-debian-gcc NOTE
r-devel-linux-x86_64-fedora-clang ERROR
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 NOTE
r-oldrel-macos-arm64 NOTE
r-oldrel-macos-x86_64 NOTE
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 NOTE
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (7 non-OK)
NOTE r-devel-linux-x86_64-debian-clang

compiled code

File ‘forecast/libs/forecast.so’:
  Found non-API call to R: ‘R_UnboundValue’

Compiled code should not call non-API entry points in R.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
and section ‘Moving into C API compliance’ for issues with the use of
non-API entry points.
NOTE r-devel-linux-x86_64-debian-gcc

compiled code

File ‘forecast/libs/forecast.so’:
  Found non-API call to R: ‘R_UnboundValue’

Compiled code should not call non-API entry points in R.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
and section ‘Moving into C API compliance’ for issues with the use of
non-API entry points.
ERROR r-devel-linux-x86_64-fedora-clang

tests

Running ‘testthat.R’ [11m/42m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(forecast)
  > 
  > test_check("forecast")
  
  	Ljung-Box test
  
  data:  Residuals from ETS(A,Ad,N)
  Q* = 28.995, df = 10, p-value = 0.001249
  
  Model df: 0.   Total lags used: 10
  
  
  	Ljung-Box test
  
  data:  Residuals from ETS(A,Ad,N)
  Q* = 20.716, df = 5, p-value = 0.0009163
  
  Model df: 0.   Total lags used: 5
  
  
  	Ljung-Box test
  
  data:  Residuals from ETS(A,Ad,N)
  Q* = 28.995, df = 10, p-value = 0.001249
  
  Model df: 0.   Total lags used: 10
  
  
  	Ljung-Box test
  
  data:  Residuals from ARIMA(1,1,0)
  Q* = 27.445, df = 9, p-value = 0.00118
  
  Model df: 1.   Total lags used: 10
  
  
  	Ljung-Box test
  
  data:  Residuals from BATS
  Q* = 9.7406, df = 10, p-value = 0.4635
  
  Model df: 0.   Total lags used: 10
  
  
  	Ljung-Box test
  
  data:  Residuals from Lag walk
  Q* = 89.288, df = 10, p-value = 7.438e-15
  
  Mod
...[truncated]...
───────────────────
  Expected `testseries_miss` to equal `tsclean(testseries_miss, replace.missing = FALSE)`.
  Differences:
    `actual[1:6]`: 1.000000000 NA 3.000000000 NA 5.000000000 6.000000000
  `expected[1:6]`: 0.910342599 NA 2.975468649 NA 5.000000000 6.000000000
  
  ── Failure ('test-season.R:91:3'): tests for stlf ──────────────────────────────
  Expected `c(stlf(y)$mean)` to equal `rep(1:7, 2)`.
  Differences:
       actual | expected               
   [1] 0.9809 - 1.0000   [1]           
   [2] 1.9828 - 2.0000   [2]           
   [3] 2.9846 - 3.0000   [3]           
   [4] 3.9864 - 4.0000   [4]           
   [5] 4.9884 - 5.0000   [5]           
   [6] 5.9901 - 6.0000   [6]           
   [7] 6.9920 - 7.0000   [7]           
   [8] 0.9742 - 1.0000   [8]           
   [9] 1.9772 - 2.0000   [9]           
  [10] 2.9800 - 3.0000   [10]          
   ... ...      ...      and 4 more ...
  
  
  [ FAIL 5 | WARN 0 | SKIP 1 | PASS 859 ]
  Error:
  ! Test failures.
  Execution halted
NOTE r-devel-windows-x86_64

compiled code

File 'forecast/libs/x64/forecast.dll':
  Found non-API call to R: 'R_UnboundValue'

Compiled code should not call non-API entry points in R.

See 'Writing portable packages' in the 'Writing R Extensions' manual,
and section 'Moving into C API compliance' for issues with the use of
non-API entry points.
NOTE r-oldrel-macos-arm64

installed package size

installed size is  5.2Mb
  sub-directories of 1Mb or more:
    libs   3.6Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  5.3Mb
  sub-directories of 1Mb or more:
    libs   3.6Mb
NOTE r-patched-linux-x86_64

compiled code

File ‘forecast/libs/forecast.so’:
  Found non-API call to R: ‘R_UnboundValue’

Compiled code should not call non-API entry points in R.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
and section ‘Moving into C API compliance’ for issues with the use of
non-API entry points.

Check History

ERROR 11 OK · 2 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 10, 2026
ERROR r-devel-linux-x86_64-fedora-clang

tests

Running ‘testthat.R’ [9m/20m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(forecast)
  > 
  > test_check("forecast")
  Saving _problems/test-clean-10.R
  Saving _problems/test-clean-20.R
  Saving 
...[truncated]...
8] 0.9742 - 1.0000   [8]           
   [9] 1.9772 - 2.0000   [9]           
  [10] 2.9800 - 3.0000   [10]          
   ... ...      ...      and 4 more ...
  
  
  [ FAIL 3 | WARN 0 | SKIP 1 | PASS 824 ]
  Error:
  ! Test failures.
  Execution halted
NOTE r-oldrel-macos-arm64

installed package size

installed size is  5.2Mb
  sub-directories of 1Mb or more:
    libs   3.5Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  5.3Mb
  sub-directories of 1Mb or more:
    libs   3.6Mb

Reverse Dependencies (209)

Dependency Network

Dependencies Reverse dependencies colorspace fracdiff generics ggplot2 lmtest magrittr nnet Rcpp timeDate urca withr zoo ARIMAANN BayesARIMAX DIMORA Dowd ECTTDNN EMDANNhybrid MAPA Mcomp Rlgt Rssa StMoMo THETASVM TSSVM ZRA demography +194 more reverse deps forecast

Version History

updated 9.0.2 ← 9.0.1 diff Mar 18, 2026
new 9.0.1 Mar 10, 2026
updated 9.0.1 ← 9.0.0 diff Feb 13, 2026
updated 9.0.0 ← 8.24.0 diff Jan 10, 2026
updated 8.24.0 ← 8.23.0 diff Apr 7, 2025
updated 8.23.0 ← 8.22.0 diff Jun 19, 2024
updated 8.22.0 ← 8.21.1 diff Mar 3, 2024
updated 8.21.1 ← 8.21 diff Aug 30, 2023
updated 8.21 ← 8.20 diff Feb 26, 2023
updated 8.20 ← 8.19 diff Jan 5, 2023
updated 8.19 ← 8.18 diff Nov 20, 2022
updated 8.18 ← 8.17.0 diff Oct 1, 2022
updated 8.17.0 ← 8.16 diff Jul 24, 2022
updated 8.16 ← 8.15 diff Jan 9, 2022
updated 8.15 ← 8.14 diff May 31, 2021
updated 8.14 ← 8.13 diff Mar 10, 2021
updated 8.13 ← 8.12 diff Sep 11, 2020
updated 8.12 ← 8.11 diff Mar 30, 2020
updated 8.11 ← 8.10 diff Feb 8, 2020
updated 8.10 ← 8.9 diff Dec 4, 2019