## MIDAS in gretl

Jack Lucchetti and I started adding MIDAS
support to gretl in June 2016. A reasonably
mature version of this support can be found in gretl 2017a (released in April
2017), though improvements are on the way for the 2017b release.

The file midas_gretl.pdf contains provisional
documentation for MIDAS in gretl. This contains some illustrative scripts, but
a longer sample script is available: gdp_midas.inp
replicates a set of ADL-MIDAS examples from Eric Ghysels' MIDAS Matlab Toolbox.
The examples in question are described in section 4.1 of the
User's Guide for the Toolbox;
the Matlab code can be found in the Toolbox file `appADLMIDAS1.m`. Native Matlab output is in
matlab_output.txt and gretl output in
gretl_replic.txt.

The dataset used in the replication exercise (quarterly US GDP plus monthly payroll employment)
is available in gretl format:
gdp_midas.gdt. (This file is now included in the gretl
package.)

A supplementary discussion of some issues connected with MIDAS forecasting can
be found in midas-supp.pdf. A summary version of
this is in the slides I prepared for the 2017 gretl conference:
gc2017.pdf.

## Using the Matlab MIDAS Toolbox with Octave

In the course of developing gretl's MIDAS apparatus I have found it helpful to
be able to run the MIDAS Matlab Toolbox on
GNU Octave. This requires
some minor modifications to the Toolbox files.
The document midas_octave.pdf gives details,
and the archive MIDASv2.0_octave.zip
contains kit to make the required modifications.

## Comparisons with R

I've also compared results with the
midasr package for
R
(documentation
here).
Some relevant files:

jss4.1-revised.R and
jss4.1-revised.txt:
Revised version of R program extracted from the midasr documentation, which replicates
the Matlab results, plus the R output.

qgdp.Rdata and
payems.Rdata: Alternatives to the data files `USqgdp`
and `USpayems` supplied with the midasr package. The alternative versions contain
exactly the data used in the Matlab examples.

Rsim.inp and Rsim.txt:
Gretl script (with embedded R) to replicate a simulated MIDAS example from section 3.2 of the
midasr doc.
The simulation includes two high-frequency series with different frequencies and different
parameterizations. Plus output.

Allin Cottrell, Wake Forest University, June 2017.