How To Install dynare-matlab on Ubuntu 18.04

In this tutorial we learn how to install dynare-matlab on Ubuntu 18.04. dynare-matlab is MATLAB support for Dynare

Introduction

In this tutorial we learn how to install dynare-matlab on Ubuntu 18.04.

What is dynare-matlab

dynare-matlab is:

Dynare is a software platform for handling a wide class of economic models, in particular dynamic stochastic general equilibrium (DSGE) and overlapping generations (OLG) models. The models solved by Dynare include those relying on the rational expectations hypothesis, wherein agents form their expectations about the future in a way consistent with the model. But Dynare is also able to handle models where expectations are formed differently: on one extreme, models where agents perfectly anticipate the future; on the other extreme, models where agents have limited rationality or imperfect knowledge of the state of the economy and, hence, form their expectations through a learning process. In terms of types of agents, models solved by Dynare can incorporate consumers, productive firms, governments, monetary authorities, investors and financial intermediaries. Some degree of heterogeneity can be achieved by including several distinct classes of agents in each of the aforementioned agent categories.

Dynare offers a user-friendly and intuitive way of describing these models. It is able to perform simulations of the model given a calibration of the model parameters and is also able to estimate these parameters given a dataset. In practice, the user will write a text file containing the list of model variables, the dynamic equations linking these variables together, the computing tasks to be performed and the desired graphical or numerical outputs.

This package is only useful to users having MATLAB installed on their machine. It contains the source of the MEX files and will recompile them using the existing MATLAB installation.

There are three methods to install dynare-matlab on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install dynare-matlab Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install dynare-matlab using apt-get by running the following command:

sudo apt-get -y install dynare-matlab

Install dynare-matlab Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install dynare-matlab using apt by running the following command:

sudo apt -y install dynare-matlab

Install dynare-matlab Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install dynare-matlab using aptitude by running the following command:

sudo aptitude -y install dynare-matlab

How To Uninstall dynare-matlab on Ubuntu 18.04

To uninstall only the dynare-matlab package we can use the following command:

sudo apt-get remove dynare-matlab

Uninstall dynare-matlab And Its Dependencies

To uninstall dynare-matlab and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove dynare-matlab

Remove dynare-matlab Configurations and Data

To remove dynare-matlab configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge dynare-matlab

Remove dynare-matlab configuration, data, and all of its dependencies

We can use the following command to remove dynare-matlab configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge dynare-matlab

References

Summary

In this tutorial we learn how to install dynare-matlab package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.