Blog posts

What’s wrong with logistic regression? Part I: The basics

One the most cited article in social sciences Carina Mood (2010) points a couple of problems in the interpretation of results from logistic regression. These problems have led many authors to move away from interpreting logistic regression coefficients, but base their conclusions on average marginal effects (AMEs) instead. Some authors even abandon logistic regression as a method to analyse binary dependent variables altogether and use linear probability models instead (e.g. Maneuvrier-Hervieu et al. 2025). In this and the following blog posts I’ll take a look at Mood’s claims and ask how serious the problems uncovered by Mood are and how helpful her suggested solutions are.

Read more ...

New article "After secularisation? A comparative analysis of religious cleavages in Western Europe"

Our paper on "After secularisation? A comparative analysis of religious cleavages in Western Europe" is now published as open access by the European Journal of Political Research (Elff et al. 2026)

Read more ...

Yet another operator to simplify data preparation with memisc

The recently published version 0.99.31.6 of the memisc package also contains an %$$% operator that simplifies routine data preparation steps that hitherto would involve calls to the function within(). It is analogous to the operator %$%, which is provided by the “magrittr” package, but is also defined by this package.

These operators are illustrated by the following code examples.

Read more ...

An R equivalent to Stata’s ‘replace if’ in memisc

Version 0.99.31.6 of package “memisc” was recently (3rd March 2023) published on CRAN. One of the new features of this version is the %if% operator which allows to assign values to subsets of observations. To see how it works, consider the following example:

I implemented this feature on suggestion from a colleague who missed such a feature for data preparation.

Read more ...

RKernel: Yet another R kernel for Jupyter

The package 'RKernel' allows you to run R in Jupyter notebooks etc. I have been working on the package on and off since summer 2021. I started because I was dissatisfied with the default rich output that the already existing IRkernel produces. Also, the help system seemed to be broken with version <= 1.3 of 'IRkernel' when used with a more recent version of R (>=4.3?).

Read more ...

New Book: Data Management in R

My new book "Data Management in R: A Guide for Social Scientists" is now in print and is announced by SAGE to appear on 26 December 2020, right on time for Boxing Day!

Supporting material can be found on the page "Data Management in R: A Guide for Social Scientists".

Read more ...

A "normalizing" re-alignment of voting behaviour in East Germany?

I am currently working on a book chapter about "Sozialstruktur und Wahlverhalten in Ost- und Westdeutschland -- Konvergenz, Divergenz oder Persistenz?" (Social Structure and Voting Behaviour in East and West Germany -- Convergence, Divergence, or Persistence?). In this context I found the remarkable result shown in the following figure.

Read more ...

Now available as open access article: "Multilevel Analysis with Few Clusters"

Our paper on "Multilevel Analysis with Few Clusters: Improving Likelihood-based Methods" is now published as an open access article by the British Journal of Political Science (Elff et al. 2021), along with a comment by Daniel Stegmueller (Stegmueller 2021) and a response by us (Elff et al. 2021).

Read more ...