Enabling OpenMP support for data.table on macOS

Xcode compilers on macOS do not support OpenMP. In consequence, R packages use only one of the many available cores for their computations, which often results in longer computing time. In this blog post, I show how to re-enable OpenMP on macOS, and how to rebuild affected R packages.

Customize and build a local lighttpd test server

While fiddling around writing a simple CGI-based web application, I found myself needing a web server for testing purposes.1 A key requirement for that server (lighttpd) being that it needs to be built and installed without root permissions and run locally from my home directory, the setup-process is a bit more involved than would be a default installation. In this post, I therefore describe how to install, configure and run lighttpd given the above conditions.

OLS in good old Fortran!

In this post, we will discuss the algorithm that produces point estimates \hat\beta given inputs y and X in linear regression. After deriving the function producing \hat\beta , I’ll briefly show how to implement this procedure in yet another compiled language, Fortran, and how to call it from within R.

Metropolis-Hastings algorithm in C

In a previous post, I presented the main ideas of the Metropolis-Hastings algorithm, and showed how one may implement a random-walk Metropolis and an independent MH sampler in R. Running them however took some time until completion, hence, in this post, I’ll show how to speed things up by implementing these very algorithms in C.

CIBAR: Plotting bar graphs with confidence intervals in Stata

Summarizing data graphically allows to have a quick glance at data of interest. For instance, we may want to assess whether a variable’s mean differs accross different groups. Stata allows to do that easily with grouped bar plots: graph bar dep_var, over(groups). However, to perform statistical inference about group differences, we require a measure of uncertainty (e.g. confidence intervals) around the group means. Without uncertainty measures, we cannot be sure whether a difference in means is in fact due to groups or rather a result of sampling error.

Building the GNU Scientific Library on Windows

Including external and up-to-date C libraries for compilation under Windows can sometimes be a bit of a challenge, as they may be outdated or not available in binary form. For libraries under a free and/or open source license (e.g. GPL, MIT), there is at least the possibility to build them on your own computer.

De Metropolis-Hastingis algorithmo

In contrast to OLS and MLE, where parameter estimation essentially boils down to solving something along the lines of \hat\beta = (X^\prime X)^{-1} X^\prime y , or respectively searching for \hat\beta such that the likelihood p(y,X|\hat\beta) is largest, estimating Bayesian models may at first feel like resorting to a black box which mysteriously produces posterior densities p(\beta|y,X) . In an attempt to lift this veil of mystery, we will take a look at the Metropolis-Hastings sampler, one of those black boxes used to estimate posterior densities.