A Word of Caution...

I am not a coding whizz kid and my knowledge of R is intermediate at best. I usually just put things down in a haste - without too much thinking and polishing (... since I do not work for NASA, I tend to prefer quick production of the code over elegance). The codes come with absolutely no warranty - feel free to use it or throw it away if you do not like it. Acknowledging the use of the codes in your applied work would be nice. Below, I only list those codes that are less common among the researchers and cannot be easily found elsewhere.

Selected codes

**Estimation of models with system priors**(generic algorithm)

**R code**

General-purpose code designed to estimate econometric models with system priors. Users are expected to write down their own functions for priors on parameters, system priors and maximum likelihood. An illustrative example of system priors proposed in Andrle and Plašil (2017) is used to provide basic guidance for writing user-defined functions. The code comes in two mutations: 1) Random Walk Metropolis-Hastings sampler with system priors for low-dimensional models, 2) Striated Metropolis Hastings sampler with system priors designed for high-dimensional problems (this code uses parallel computing)

[ code 1: Metropolis Hastings] [ code 2: Striated Metropolis Hastings]

**Flexible least squares**(univariate regression)

**R code**

A by-product of the Note on the efficient simulation in state space models. The estimate is based on the fast Cholesky decomposition of the sparse block band (tridiagonal) matrix. Other software implementations of flexible least squares are available (see the Flexible least square home page).

[code]

**Dynamic Model Averaging, DMA**(univariate case)

**R code**

The code was written before the DMA R package appeared. It still might be useful for some users (in my hands, the DMA package did not produce results I expected). The eDMA package does a nice job but takes slightly different approach. Moreover, some users of the eDMA package may still miss some important outputs. Matlab users may want to visit pages of Dimitris Korobilis. The code comes in two mutations: i) fixed forgetting factor, ii) time-varying forgetting factor.

[code 1: fixed lambda] [code 2: time-varying lambda]

**Dynamic model Averaging, DMA**(for the VAR model)

**R code**

The code was originally written by my co-author Tomas Adam for our joint work. I only made it slightly more general and produced additional explanatory comments.

[code]

**Weighted average least square estimator**(with Subbotin priors)

**R code**

This is more or less a transcription of the original Matlab code by Jan Magnus into R. Both versions with and without semi-orthogonal transformation are provided (common users do not need to care about the difference and should use the version with semi-orthogonal transformation).

[code]

**ViSOM**(multivariate data projection method)

**R code**

Visualization-induced Self Organizing Map designed to visualize highly multivariate data sets. Unlike traditional SOMs, the ViSOM algorithm constraints and regularizes the inter-neuron distance in order to preserve topology and the inter-point distances of the input data on the map.

[code]

**Accompanying code to:**

**Measuring the Financial Cycle**(pupose-specific code)

**R code**

The code calculates the values of the indicator. It can be easily adapted to reflect national specificities.

[code]