Lecture_5_Estimation_Forecasting
Lecture_5_Estimation_Forecasting
• For MA(1) and AR(1), there are only three unknown parameters. So,
one equation for 𝜌1 is sufficient.
Parameters Estimation - Moment Matching
• For AR(1), the equations are
𝑚
= 𝑋ത
1−𝜙
𝜎2
= 𝛾ො0
1−𝜙2
𝜙 = 𝜌ො1
Parameters Estimation - Moment Matching
Parameters Estimation - Moment Matching
• In the example, the equations becomes
𝑚
• = 0.244682
1−𝜙
𝜎2 2
= 1.467377
1−𝜙2
𝜙 = 0.740
𝜇 = 𝑋ത
1 + 𝜃 2 𝜎 2 = 𝛾ො0
−𝜃
= 𝜌ො1
1+𝜃 2
Parameters Estimation - Moment Matching
Parameters Estimation - Moment Matching
• In the example, the equations becomes
𝜇 = −0.05832
1 + 𝜃 2 𝜎 2 = 1.370795 2
−𝜃
= 0.493
1+𝜃 2
𝜖𝑡Ƹ 𝑚, 𝜙 or 𝜖𝑡Ƹ 𝜇, 𝜃
• arima(Series1, order=c(1,0,0))
Least Square
Estimate
• For MA(1) model, the output means
𝑋𝑡 = 0.0603 + 𝜖𝑡 + 0.4056𝜖𝑡−1
Least Square
Estimate
Forecasting
Forecasting
• 𝑘 -step ahead forecasting:
• Predicting 𝑋𝑛+𝑘 at time 𝑛
• Conditional mean 𝐸 𝑋𝑛+𝑘 |𝐹𝑛
• Conditional variance 𝑉𝑎𝑟 𝑋𝑛+𝑘 |𝐹𝑛
• 𝐹𝑛 is all information available at time 𝑛
• Predicted value
𝐸 𝑋𝑛+𝑘 |𝐹𝑛 = 𝜇 + 𝜙 𝑘 𝑋𝑛 − 𝜇
• Variance of prediction
𝑉𝑎𝑟 𝑋𝑛+𝑘 𝐹𝑛 = 1 + 𝜙 2 + ⋯ + 𝜙 2 𝑘−1 𝜎2
• Solution: We have
𝐸 𝑋101 𝐹100 = 5 + 0.91 4.8 − 5 = 4.82 and 𝑉𝑎𝑟 𝑋101 𝐹100 = 0.04.
• Solution:
𝐸 𝑋4 |𝐹2 = 3.952 with 𝑉𝑎𝑟 𝑋4 𝐹2 = 0.002592 1 + 0.23112 =0.002730.
The 99% prediction interval is then
3.952 − 2.58 0.002730, 3.952 + 2.58 0.002730 = [3.817, 4.087]
Forecasting in RStudio
• Forecasting can be done directly in R.
• res2$pred-1.96*res2$se
res2$pred+1.96*res2$se