forecast vs. infer

1 回表示 (過去 30 日間)
Lorant Foldvary
Lorant Foldvary 2018 年 8 月 12 日
回答済み: Aman 2024 年 10 月 7 日
Hi,
Let's have a stationary data with 100 elements. Let's use the first 70 for defining an appropriate ARIMA model (EstMdl), and use the last 30 for tests. Test 1: infering residuals for the last 30 elements: E = infer(EstMdl,data(71:100),'Y0',dat(1:70)); Test 2: forecasting the last 30 elements: OUT = forecast(EstMdl,30,'Y0',dat(1:70)); then determining the residual as: res = data(71:100)-OUT;
According to my understanding, res should be equal to E. But they are not. Why?
Regards Lorant

回答 (1 件)

Aman
Aman 2024 年 10 月 7 日
As per my understanding, you want to know why there is discrepancy in the output of the two functions.
The difference is coming due to the below two reasons:
  • "infer" computes residuals based on how well the model fits the known data, while "forecast" predicts future values and compares them to actual data, reflecting predictive accuracy.
  • Both functions use initial conditions differently; "infer" focuses on fitting within the known dataset, whereas "forecast" extends beyond the training data for predictions.
I hope it clears your doubt :)

カテゴリ

Help Center および File ExchangeConditional Mean Models についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by