y_t=c(1)+c(2)*y_{t-1}+c(3)*y_{t-2}+c(4)*y_{t-3}+c(5)*y_{t-4}
is estimated while the trend estimate is:
\hat{y}_{t+h}=est_c(1)+est_c(2)*y_{t-1}+est_c(3)*y_{t-2}+est_c(4)*y_{t-3}+est_c(5)*y_{t-4}
The code in the add-in is:
Code: Select all
HamiltonEstimation192873.ls {%inputvarname} c {%inputvarname}(-1) {%inputvarname}(-2) {%inputvarname}(-3) {%inputvarname}(-4)
'Generate the trend with the fitted values from the equation estimation and lags
{%trendoutputname}(!i + 5 +!h) = c(1) _
+ c(2) * {%inputvarname}(!i+4) _
+ c(3) * {%inputvarname}(!i+3) _
+ c(4) * {%inputvarname}(!i+2) _
+ c(5) * {%inputvarname}(!i+1)
This is not how I read Hamilton's paper. Instead, I gather that the filter regression to be estimated is:
y_{t+h}=c(1)+c(2)*y_{t}+c(3)*y_{t-1}+c(4)*y_{t-2}+c(5)*y_{t-3}
Have I missed something or is there room for changing the regression in the add-in?
Best,
Krille