Inputs
Example Data Table
| Index | Y | X1 |
|---|---|---|
| 1 | 120 | 1 |
| 2 | 128 | 1 |
| 3 | 133 | 1 |
| 4 | 129 | 1 |
| 5 | 142 | 1 |
| 6 | 150 | 2 |
| 7 | 147 | 2 |
| 8 | 155 | 2 |
| 9 | 162 | 2 |
| 10 | 160 | 3 |
| 11 | 171 | 3 |
| 12 | 180 | 3 |
Formula Used
The calculator models a time series using autoregressive terms, moving-average terms, and optional predictors. Differencing is applied first to reduce trend or seasonality.
- p controls how many past values influence y′t.
- d sets how many times the series is differenced.
- q uses past residuals to capture short shocks.
- β coefficients measure predictor effects.
How to Use This Calculator
- Paste your time series into Y, one value per line.
- If you have predictors, paste them into X1–X3 with equal length.
- Start with small orders, like (1,1,1), and increase carefully.
- Enable seasonality only when you know the period s.
- Press Compute Model to see results above the form.
- Use Download CSV or Download PDF for reporting.
Data preparation and stationarity checks
Enter a numeric sequence and optional predictors with equal length. For differencing and lagging, target at least 50 observations; 100+ is better when seasonality is enabled. Use d=1 when the level trends, and keep d=0 when the mean is steady. If a pattern repeats every s steps, set s to 12 for monthly or 7 for daily cycles, and apply D=1 to remove seasonal drift.
Selecting orders and predictors
Begin with small orders to limit overfitting. A common starting point is (1,1,1), then test p and q up to 3 if residual autocorrelation persists. Add X1–X3 only for drivers you can measure, such as marketing intensity or temperature index. If a predictor is negligible and errors barely change, remove it and re-fit. Keep the largest lag comfortably below the post-differencing sample size.
Estimation approach and stability controls
The calculator uses iterative least squares to approximate ARIMA regression with moving-average terms. MA terms depend on residual lags, so the model re-estimates several times; 5 iterations works for most series, while 10 can help difficult fits. The ridge stabilizer adds a small penalty to improve conditioning. If estimation fails, increase ridge from 1e-6 to 1e-4, or reduce P and Q to simplify.
Interpreting diagnostics and model quality
Quality is summarized with RMSE, MAE, MAPE, AIC, and BIC. Lower RMSE and MAE indicate better scale accuracy, while lower AIC/BIC favor simpler models. The Ljung-Box Q statistic tests whether residuals look like white noise up to m lags; choose m between 10 and 20 for moderate series. If Q is large, adjust p or q, or revisit differencing decisions.
Forecasting outputs and reporting
Forecasts are returned to the original scale by inverting differencing. The table includes an approximate 95% interval using 1.96×RMSE, suitable for planning ranges rather than strict inference. Use shorter horizons, such as h=6 to h=12, when future predictors are held constant. Download CSV to compare experiments, and export a PDF report for review of assumptions, errors, and forecasts. Document chosen orders so results remain reproducible across teams later.
FAQs
1) What do p, d, and q represent?
p counts autoregressive lags, d is the number of differences applied, and q counts moving-average residual lags. Start small, then adjust based on residual patterns and error metrics.
2) Do I need to make the series stationary first?
You do not need manual transforms, but you should choose differencing that stabilizes the mean. Use d=1 for trend and D=1 for repeating seasonal drift with period s.
3) How should I pick the seasonal period s?
Set s to the cycle length in observations: 12 for monthly seasonality, 7 for daily weekly cycles, or 4 for quarterly patterns. Use seasonality only when the cycle is consistent.
4) What does the ridge stabilizer do?
Ridge adds a small penalty to the normal equations, reducing sensitivity to collinearity and near-singular matrices. If estimation fails or coefficients explode, increase ridge modestly and reduce lag orders.
5) Are the forecast intervals statistically exact?
No. The intervals use 1.96×RMSE as an illustrative planning band. Exact intervals require a full state-space or maximum-likelihood approach with forecast error propagation.
6) Can I compare multiple model runs?
Yes. Download CSV after each run and keep a log of orders, differencing, and predictors. Compare RMSE, AIC, and residual diagnostics to select the most stable, parsimonious model.