Page 1 of 1

Almon/PDL in MiDaS

Posted: Wed Oct 19, 2016 2:17 am
by KrilleJ
We have recently been exploring MiDaS in EViews, it is a really great feature. Also, the MiDaS webinar was superb.

However, I have a minor problem with the Almon/PDL weighting in the MiDaS estimation. The issue is described in the attached PDF.

Also, when determining the degree of the Almon polynomial, I miss an estimated parameter. Suppose that I choose polynomial degree 3. Then I would expect to get 4 estimated parameters (the a_i:s) for the polynomial: a_0+a_1*X+a_2*X^2+a_3*X^3. But only three estimated parameters are presented in the output. I suspect that a second degree polynomial is estimated when setting polynomial degree to 3: a_0+a_1*X+a_2*X^2. Is this so or is it a restricted (a_0=0) third degree polynomial (a_1*X+a_2*X^2+a_3*X^3) that is estimated?

Best,
Kristian

Re: Almon/PDL in MiDaS

Posted: Wed Oct 19, 2016 8:01 am
by EViews Gareth
Here's an EViews program that manually computes an example MIDAS model, and shows the weighting calculations:

Code: Select all

!xlags = 4 !ylags=1 !horizon=2 !polyorder = 3 ' matlab order +1 wfopen(wf=midas, page=quarterly) .\mydata.xlsx range="Sheet1" pageload(page=monthly) .\mydata.xlsx range="Sheet2" series x1 = dlog(value(-!horizon))*100 for !i=2 to !xlags series x!i = x1(-!i+1) next for !i=1 to !xlags series z!i=x!i(-2) next pageselect quarterly series y = dlog(value)*100 smpl 1985 2009/1/1 for !i=1 to !xlags copy(c=l) monthly\z!i x!i next for !i=1 to !polyorder series z!i=0 next for !i=1 to !xlags for !j=1 to !polyorder z!j = z!j + !i^(!j-1)*x!i next next group xlags z* group ylags for !i=1 to !ylags ylags.add y(-!i) next equation eq2.ls y c xlags ylags show eq2 equation eq1.midas(freq=first) y c y(-1) @ monthly\x1 show eq1

Re: Almon/PDL in MiDaS

Posted: Thu Oct 20, 2016 12:33 am
by KrilleJ
It is exectly this I am after.

Estimations in EViews and the MiDaS toolbox for Matlab use the weighting

for !i=1 to !xlags
for !j=1 to !polyorder
z!j = z!j + !i^(!j-1)*x!i
next
next

In the documentation for the MiDaS Matlab toolbox (see equation 2.10 in the documentation for version 2.1 as of August 3, 2016), in the documentation for EViews 9.5 (Equation 28.6) and in Intriligator (1978) Econometric models, techniques, and applications, page 183, equation 6.7.28, the weighting described for the Almon/PDL case is

for !i=1 to !xlags
for !j=1 to !polyorder
z!j = z!j + (!i-1)^(!j-1)*x!i
next
next

This might of course be a minor difference (although the curvature of the estimated parameters seems to be affected), but if I understand you correctly it is the documentation that is the candidate to be changed and not the estimation routine?

Re: Almon/PDL in MiDaS

Posted: Thu Oct 20, 2016 1:22 am
by EViews Gareth
Yes