-
Notifications
You must be signed in to change notification settings - Fork 22
Visualisation and Output
This page documents the methods for visualising and printing smooth models. These methods work with objects returned by ADAM, ES, CES, SSARIMA, MSARIMA, GUM, SMA, and OES.
Prints a concise summary of the model to the console.
model <- adam(AirPassengers, "MMM", lags=12, h=12, holdout=TRUE)
print(model)
# Or simply:
modelmodel = ADAM(model="MMM", lags=12)
model.fit(AirPassengers)
print(model)The print method displays:
- Model type (e.g., "ETS(M,M,M)")
- Initialisation type
- Distribution used
- Loss function value
- Estimated parameters (persistence, phi)
- Number of parameters and observations
- Information criteria (AIC, AICc, BIC, BICc)
- If
holdout=TRUE, the error measures for the holdout are also printed
Note: In Python, the error measures are not automatically calculated for the holdout set.
Time elapsed: 2.73 seconds
Model estimated using adam() function: ETS(MMM)
With backcasting initialisation
Distribution assumed in the model: Gamma
Loss function type: likelihood; Loss function value: 473.813
Persistence vector g:
alpha beta gamma
0.6029 0.0001 0.2600
Sample size: 132
Number of estimated parameters: 4
Number of degrees of freedom: 128
Information criteria:
AIC AICc BIC BICc
955.6260 955.9410 967.1573 967.9262
Forecast errors:
ME: -20.52; MAE: 20.729; RMSE: 26.218
sCE: -93.809%; Asymmetry: -97.1%; sMAE: 7.897%; sMSE: 0.998%
MASE: 0.861; RMSSE: 0.837; rMAE: 0.273; rRMSE: 0.255
Produces diagnostic plots for smooth models. Multiple plot types are available depending on the model.
Note: Not yet implemented in Python.
# Basic diagnostic plots
model <- adam(AirPassengers, "ZZZ", lags=12, h=12, holdout=TRUE)
# Single plot
plot(model, which=1)
# Multiple plots
par(mfcol=c(3,4))
plot(model, which=c(1:11))
par(mfcol=c(1,1))
# Decomposition plot
plot(model, which=12)| which | Plot Type | Description |
|---|---|---|
| 1 | Actuals vs Fitted | Time series plot of actual values and fitted values |
| 2 | Standardised residuals | Residuals divided by their standard deviation |
| 3 | Histogram | Distribution of standardised residuals |
| 4 | ACF | Autocorrelation function of residuals |
| 5 | PACF | Partial autocorrelation function of residuals |
| 6 | Q-Q plot | Normal probability plot of residuals |
| 7 | Fitted vs Actuals (scatter) | Scatterplot with fitted on x-axis |
| 8 | Squared residuals vs Fitted | Heteroscedasticity diagnostic |
| 9 | ACF of squared residuals | ARCH effects diagnostic |
| 10 | Residuals vs Time | Time plot of residuals |
| 11 | Forecast fan chart | Point forecasts with prediction intervals |
| 12 | Decomposition | Components of the model (level, trend, seasonal) |
| Parameter | Type (R) | Type (Python) | Default | Description |
|---|---|---|---|---|
x |
adam/smooth | TBA | - | Fitted model object |
which |
integer vector | TBA | c(1,2,4,6) | Which plots to produce |
level |
numeric | TBA | 0.95 | Confidence level for intervals |
legend |
logical | TBA | FALSE | Show legend on plots |
ask |
logical | TBA | TRUE | Prompt before each plot |
lowess |
logical | TBA | TRUE | Add LOWESS line to scatter plots |
library(smooth)
# Fit model
model <- adam(AirPassengers, "MMM", lags=12, h=12, holdout=TRUE)
# Quick diagnostics (default plots)
plot(model)
# Full diagnostic suite
par(mfcol=c(3,4))
plot(model, which=1:11)
# Decomposition view
par(mfcol=c(1,1))
plot(model, which=12)Provides a detailed summary including parameter estimates with standard errors and confidence intervals.
Note: Not yet implemented in Python.
model <- adam(AirPassengers, "MMM", lags=12, h=12, holdout=TRUE)
summary(model)The summary includes:
- Model specification
- Time elapsed
- Loss value and information criteria
- Parameter estimates with:
- Estimate value
- Standard error
- Lower confidence interval
- Upper confidence interval
- Degrees of freedom
model <- adam(BJsales, "AAN", h=12, holdout=TRUE)
summary(model)Output:
Model estimated using adam() function: ETS(AAN)
Response variable: BJsales
Distribution used in the estimation: Normal
Loss function type: likelihood; Loss function value: 240.6045
Coefficients:
Estimate Std. Error Lower 2.5% Upper 97.5%
alpha 1.0000 0.0966 0.8090 1.0000 *
beta 0.2437 0.0802 0.0851 0.4023 *
Error standard deviation: 1.3936
Sample size: 138
Number of estimated parameters: 3
Number of degrees of freedom: 135
Information criteria:
AIC AICc BIC BICc
487.2090 487.3881 495.9908 496.4320
Standard errors are computed using the Fisher Information matrix, which is computationally expensive. For models with many parameters (>30), this calculation may take considerable time. Also, the success of the computation of this depends on how close the loss function value was to the optimum in the estimation.
Creates LaTeX table output from the model summary. Useful for academic papers and reports.
Note: Not yet implemented in Python.
library(xtable)
model <- adam(BJsales, "AAN", lags=12, h=12, holdout=TRUE)
modelSummary <- summary(model)
# Generate LaTeX table
xtable(modelSummary)Produces LaTeX code that can be included directly in documents:
% latex table generated in R 4.5.1 by xtable 1.8-4 package
% Fri Jan 30 09:54:58 2026
\begin{table}[ht]
\centering
\begin{tabular}{rrrrr}
\hline
& Estimate & Std. Error & Lower 2.5\% & Upper 97.5\% \\
\hline
alpha & 1.0000 & 0.0966 & 0.81 & 1.0000 \\
beta & 0.2437 & 0.0802 & 0.09 & 0.4023 \\
\hline
\end{tabular}
\end{table}Plot forecasts with prediction intervals using the forecast() function output.
Note: Not yet implemented in Python.
model <- adam(AirPassengers, "MMM", lags=12, h=12, holdout=TRUE)
# Generate forecast
modelForecast <- forecast(model, h=24, interval="prediction")
# Plot forecast
plot(modelForecast)
# Multiple confidence levels
modelForecast <- forecast(model, h=24, interval="semiparametric", level=c(0.9, 0.95))
plot(modelForecast)- ADAM - Main ADAM function
- Coefficients-and-Parameters - Extracting model parameters
- Model-Information - Model diagnostics and information