QUICK GUIDE FOR INSTALLATION AND REPLICATION


1. File list
------------

v104i02.inp:    Gretl script for the examples 
growth_BMA.gdt: Dataset for example 1
linear_pip.plt: gnuplot script for Figure 1

The software package "ParMA.zip" is available as a separate supplementary file
in the Journal of Statistical Software at https://doi.org/10.18637/jss.v104.i02
or the most current release is available on the gretl function packages archive
at http://gretl.sourceforge.net/current_fnfiles/ParMA.zip


2. Gretl version and MPI packages
---------------------------------

The ParMA package relies heavily on cpu parallelisation via the MPI standard.
To enable MPI in gretl, it is required to have a suitable MPI package installed:

a) For Windows users: download the latest version of MS-MPI to enable MPI 
and the latest gretl version from http://gretl.sourceforge.net;

b) For Mac users: install Open MPI (we suggest to use
the link on the gretl+mpi guide and follow the instructions for
installation) and the latest gretl version from
http://gretl.sourceforge.net. Notice that this applies for both Intel
and M1 processors, however, gretl parallelisation has been extensively 
tested only on the former so far.
For this reason, we do not recommend to replicate the script on M1 devices.

c) For Linux users: install one of Open MPI or MPICH and then build gretl from 
the git sources; be sure to enable mpi (see the gretl+mpi guide for details about
the MPI package installation, and the user's gretl guide, Appendix B, for 
additional information regarding the building procedure).

To test if gretl loads the MPI libraries correctly, run the following command
from the gretl console:

eval $sysinfo

This will produce a bundle with several elements: the "mpi" Boolean key 
indicates if MPI is operational (1 is ok, 0 is not).

The documentation for using MPI with gretl (gretl+mpi guide) is available at
https://sourceforge.net/projects/gretl/files/manual/gretl-mpi.pdf/download 


3. Installing the package
-------------------------

The ParMA package can be installed from the gretl official repository:
from the GUI client select "File, Function packages, On server", at
this point search for the ParMA pkg and install it. Alternatively,
open a gretl console and run the following command:

pkg install ParMA

For any additional detail about package installation, please see the
gretl function package guide.

NOTE: the multiplot pkg should be installed in order to enable the
correct plotting of ParMA graphs. This pkg usually comes together with
the installation of ParMA by default, however if this is not the case,
multiplot should be installed manually via the same procedure as above.


4.Running the replication files
-------------------------------

The replication script can be executed as standard gretl scripts, either 
from the GUI or via the command-line client (gretlcli).

a) Using gretl GUI: open the script with the built-in script editor and execute it.
Alternatively, the script can be run from the gretl console. In this case, once 
opened the console type the following command:

run /path/to/file/v104i02.inp

where /path/to/file/ is the directory where v104i02.inp has been placed.

b) Using gretlcli: open gretlcli and simply run the following command

run /path/to/file/v104i02.inp

where /path/to/file/ is the directory where v104i02.inp has been placed.

For any detail about gretlcli, see Chapter 51 of the user's guide.

NOTE: to guarantee the correct working of the replication file, the dataset file
growth_BMA.gdt should be placed in the same directory of v104i02.inp.


5.License
---------

The function package is released under the GNU GPL v3 license.
