Skip to content
Ivan Svetunkov edited this page Jan 30, 2026 · 41 revisions

smooth Wiki

Welcome to the smooth package wiki! The smooth package implements Single Source of Error (SSOE) state-space models for forecasting and time series analysis, available for both R and Python (under development).

Quick Links

Main Forecasting Functions

Function Description Python R
ADAM Augmented Dynamic Adaptive Model - unified ETS/ARIMA/regression framework Yes Yes
auto.adam Automatic ADAM with distribution and ARIMA order selection TBA Yes
ES Exponential Smoothing (ETS) wrapper for ADAM Yes Yes
CES Complex Exponential Smoothing TBA Yes
SSARIMA State Space ARIMA TBA Yes
MSARIMA Multiple Seasonal ARIMA TBA Yes
GUM Generalised Univariate Model TBA Yes
SMA Simple Moving Average TBA Yes
OES Occurrence ETS for intermittent demand TBA Yes

Utility Functions

Function Description Python R
msdecompose Multiple seasonal decomposition (used for ADAM/ES initialization) Yes Yes
lowess Scatter plot smoothing from Cleveland, W. S. (1979). Yes in stats package

lowess was implemented in Python to fully reproduce R's behaviour. The other existing Python implementations were not as accurate.

Getting Started

Installation

See Installation for details.

Python

from smooth import ADAM, ES, msdecompose

# Automatic ETS model selection
model = ADAM(model="ZXZ", lags=12)
model.fit(y)
forecasts = model.predict(h=12)

# Simple Exponential Smoothing
model = ES(model="ZXZ")
model.fit(y)

# Time series decomposition
result = msdecompose(y, lags=[12], type='additive')

R

library(smooth)

# Automatic model selection
model <- adam(y, model="ZXZ", lags=12)
forecast(model, h=12)

# Automatic distribution and ARIMA selection
model <- auto.adam(y, model="ZZZ",
                   orders=list(ar=2, i=2, ma=2, select=TRUE),
                   distribution=c("dnorm","dlaplace","ds"))

# Exponential Smoothing
model <- es(y, model="ZXZ", h=12)

Recommended Function

ADAM is the recommended function for most forecasting tasks. It provides:

  • Unified ETS and ARIMA framework
  • Multiple seasonality support
  • Various error distributions
  • Intermittent demand handling
  • External regressors
  • Automatic model selection
  • ... and more

Common Parameters

These pages document parameters shared across multiple functions:

Methods and Tools

Output and Visualisation

Parameters and Forecasts

Residuals and Diagnostics

Model Comparison

Model Information

Advanced Methods

R vs Python Comparison

Main Functions

Function R Python Wiki
adam() Yes ADAM class ADAM
auto.adam() Yes TBA auto.adam
es() Yes ES class ES
ces() Yes TBA CES
gum() Yes TBA GUM
ssarima() Yes TBA SSARIMA
msarima() Yes TBA MSARIMA
sma() Yes TBA SMA
oes() Yes TBA OES
msdecompose() Yes Yes msdecompose
lowess() in stats Yes -

Methods

Fitting and Forecasting:

Method R Python Description
fit adam() .fit() Fit the model
predict forecast() / predict() .predict() Generate forecasts
fitted Yes .fitted Fitted values
actuals Yes .actuals Original data
simulate Yes TBA Simulate from model

Output and Visualisation:

Method R Python Description
summary Yes TBA Model summary with confidence intervals etc
print Yes print() Basic output
plot Yes TBA Diagnostic plots
xtable Yes TBA LaTeX tables

Coefficients and Parameters:

Method R Python Description
coef Yes .coef Extract coefficients
confint Yes TBA Confidence intervals
vcov Yes TBA Variance-covariance matrix
coefbootstrap Yes TBA Bootstrap coefficients

Residuals and Errors:

Method R Python Description
residuals Yes .residuals Model residuals
rstandard Yes TBA Standardised residuals
rstudent Yes TBA Studentised residuals
rmultistep Yes TBA Multi-step forecast errors
multicov Yes TBA Multi-step error covariance
outlierdummy Yes TBA Outlier dummy variables

Likelihood and Information Criteria:

Method R Python Description
logLik Yes TBA Log-likelihood
AIC / BIC Yes TBA Information criteria
AICc / BICc Yes TBA Corrected IC
accuracy Yes TBA Forecast accuracy measures
pls Yes TBA Prediction likelihood score

Model Information:

Method R Python Description
nobs Yes .nobs Number of observations
nparam Yes .nparam Number of parameters
sigma Yes .sigma Residual standard deviation
errorType Yes .error_type Error type (A/M)
modelType Yes .model_type Model specification
modelName Yes .model_name Full model name
orders Yes .orders ARIMA orders
lags Yes .lags Model lags

Advanced Methods:

Method R Python Description
reapply Yes TBA Refit with perturbed parameters
reforecast Yes TBA Forecast with parameter uncertainty
sm Yes TBA Scale model (heteroscedasticity)

Additional Resources

Clone this wiki locally