Calculator Inputs
Example Data Table
| Time | Sales (Y) | Ad Spend (X) |
|---|---|---|
| 1 | 120 | 20 |
| 2 | 128 | 22 |
| 3 | 135 | 23 |
| 4 | 140 | 25 |
| 5 | 148 | 26 |
| 6 | 155 | 27 |
| 7 | 162 | 29 |
| 8 | 170 | 31 |
| 9 | 178 | 32 |
| 10 | 185 | 34 |
| 11 | 193 | 36 |
| 12 | 205 | 38 |
This sample lets you test trend, external predictors, forecast steps, and optional seasonal structure immediately.
Formula Used
Time series regression estimates a dependent sequence using structured predictors. The calculator can include an intercept, a linear trend, an external regressor, a lagged dependent term, and seasonal dummy variables.
General model:
Yₜ = β₀ + β₁Xₜ + β₂t + β₃Yₜ₋₁ + ΣγⱼDⱼ,ₜ + εₜ
Matrix solution: β = (X′X)⁻¹X′Y
Key diagnostics: R², adjusted R², RMSE, MAE, MAPE, Durbin-Watson, AIC, and BIC.
Where:
• Yₜ is the observed value at time t.
• Xₜ is an optional external predictor.
• t is the time index for trend estimation.
• Yₜ₋₁ is the previous period’s observed value.
• Dⱼ,ₜ are seasonal dummy variables for repeated patterns.
How to Use This Calculator
- Enter the dependent series in chronological order.
- Add an external predictor series if your model uses one.
- Choose whether to include intercept, trend, and lagged Y.
- Enter a season period such as 4 for quarterly or 12 for monthly seasonality.
- Add future X values when forecasting with an external regressor.
- Set the number of future steps to forecast.
- Click Run Regression to generate coefficients, diagnostics, fitted values, and forecast rows.
- Use the CSV and PDF buttons to export the current results.
Frequently Asked Questions
1. What does time series regression measure?
It explains how a sequence changes over time by linking values to trend, lag effects, seasonality, and optional external predictors. It also produces fitted values and forecasts.
2. When should I include a trend term?
Include trend when values generally rise or fall over time. It helps separate long-run direction from short-run fluctuations, especially in business, economics, and operational data.
3. Why would I include a lagged dependent variable?
Use a lag when the current value depends on the previous period. This is common in demand, traffic, energy, and finance series that show persistence.
4. How do seasonal dummies work?
Seasonal dummies capture repeated patterns across periods such as months or quarters. For example, a period of 12 models monthly cycles and compares each season to a baseline season.
5. Why do usable observations sometimes drop?
When lagged Y is enabled, the first row cannot be estimated because it lacks a previous value. That observation is removed from the usable regression sample.
6. What does Durbin-Watson show?
Durbin-Watson checks residual autocorrelation. Values near 2 suggest weaker serial correlation, while much lower or higher values may signal remaining time-related structure in errors.
7. Can I forecast without an external predictor?
Yes. You can forecast with intercept, trend, lag, and seasonality alone. If external X is part of the model, future X values improve forecast relevance.
8. Why might the calculator report a matrix inversion issue?
That usually means your predictors overlap too much or your sample is too small. Remove redundant options, add more data, or simplify the regression structure.