Calculator Inputs
Use estimated coefficients for quick analysis, or switch to manual coefficients when you already know the AR model.
Example Data Table
You can paste these sample observations into the calculator to test AR estimation, fitted values, errors, roots, and forecasts.
| Time | Observed Value |
|---|---|
| 1 | 52 |
| 2 | 54 |
| 3 | 55 |
| 4 | 57 |
| 5 | 56 |
| 6 | 58 |
| 7 | 60 |
| 8 | 61 |
| 9 | 63 |
| 10 | 62 |
| 11 | 64 |
| 12 | 66 |
| 13 | 67 |
| 14 | 68 |
| 15 | 70 |
Formula Used
Autoregressive model: For an AR(p) process, the calculator uses
Xt = c + φ1Xt-1 + φ2Xt-2 + ... + φpXt-p + εt.
Coefficient estimation: In estimate mode, coefficients are obtained with ordinary least squares by regressing the current value on its lagged values and an intercept.
Fitted value: Each one-step fitted value uses the actual lagged observations:
Ŷt = c + Σ φiXt-i.
Residual: The residual is
et = Xt - Ŷt.
From residuals, the calculator reports SSE, MSE, RMSE, MAE, MAPE, residual variance, AIC, BIC, and R².
Forecast recursion: Future values are generated recursively:
Ft+h = c + Σ φiFt+h-i,
using actual values when available and prior forecasts afterward.
Forecast interval: The forecast standard error uses AR ψ-weights. The interval is
Forecast ± z × SE,
where z matches the selected confidence level.
Stationarity check: The model is stationary when all roots of the characteristic polynomial
1 - φ1z - φ2z² - ... - φpzp = 0
lie outside the unit circle.
How to Use This Calculator
- Paste your observed time series into the data field. Use commas, spaces, or line breaks.
- Choose the AR order. Start with a small value like 1, 2, or 3.
- Select Estimate coefficients to fit the model automatically, or choose Manual coefficients to supply your own intercept and lag weights.
- Set forecast steps, confidence level, and decimal precision.
- Press the calculate button. Results appear above the form under the page header.
- Review summary diagnostics, characteristic roots, fitted values, residuals, and the forecast table.
- Use the CSV or PDF buttons to save the results for documentation or reporting.
FAQs
1) What does an autoregressive model measure?
An autoregressive model explains a current value using its past values. It is useful when recent observations carry information about the next observation in a time series.
2) What is AR(p)?
AR(p) means the model uses p lagged observations. For example, AR(2) uses the previous two values to estimate or forecast the current one.
3) Should I estimate coefficients or enter them manually?
Estimate mode is best when you only have raw data. Manual mode is useful when you already know the intercept and lag coefficients from previous analysis.
4) Why does stationarity matter?
Stationarity keeps the process stable over time. If roots are not outside the unit circle, long-run forecasts and variance behavior can become unreliable or explosive.
5) What do RMSE and MAE tell me?
Both measure forecast or fit error. MAE shows the average absolute error, while RMSE penalizes large mistakes more heavily because it squares residuals before averaging.
6) Why are the first rows missing fitted values?
The model needs earlier observations as lags. An AR(3) model cannot produce a fitted value until at least the fourth observation is available.
7) Can I use this for forecasting?
Yes. The calculator generates multi-step recursive forecasts and confidence intervals. Forecast uncertainty grows with the horizon, which is why intervals widen further ahead.
8) How do AIC and BIC help?
AIC and BIC compare model quality while penalizing unnecessary complexity. Lower values usually indicate a more efficient balance between fit quality and model size.