R

The problem of false positives: Antibody tests in times of Corona

A few weeks or months from now, we could have a Covid-19 test kit sent to our home. Similar to a blood sugar test for diabetics, we would prick our finger, wait for a couple of minutes, and we will know whether we are immune or not. The general idea is that this would help in lessen the social distancing restrictions because those who are immune could in principle go back to a normal life.… Read More »The problem of false positives: Antibody tests in times of Corona

Understanding exponential growth: The corona pandemic

With the news going crazy these days, I felt like there is one particularly thing that is often misunderstood. The corona virus spreads exponentially (without intervention or measures). The problem is that we – as human beings – are very bad at imagining what an exponential trend looks like. By now, many differnet graphics and figures appear everywhere that aim to visualize the amount of infections or mortality rates per country. One of the most… Read More »Understanding exponential growth: The corona pandemic

Estimating power for structural equation models: Simulations in R

Computing a priori power analyses for simple statistical models can be done analytically (e.g., with G*Power or the pwr package in R). However, estimating the power for more complex models and in particular structural equation models (SEM) is not as straightforward and requires simulations. I recently came across the package paramtest (Hughes, 2017) which provides a great framework for conducting more complex power simulations. In what follows, I provide some examples of how to simulate… Read More »Estimating power for structural equation models: Simulations in R

How to do specification curve analyses in R: Introducing ‘specr’

In the last month, Michael Scharkow and I have worked on a new R-package called specr. The goal was to facilitate specification curve analyses (also called multiverse analyses). The idea behind a specification curve analysis stems from the observation that a researchers has many degrees of freedom when conducting a quantitative analysis of a data set. It starts with the question of how to operationalize the dependent and the independent variable, what model to estimate,… Read More »How to do specification curve analyses in R: Introducing ‘specr’

How to visualize interaction effects

I recently gave a workshop on data visualization. One of the topics was visualizing interaction effects (or “moderation” analyses). I think it is a great topic because it exemplifies quite well that there is not one solution to all problems. In general, I would argue that trying to visualize interaction effects is great idea. Due to the conditional nature of the effects obtained from standard regression analyses that include an interaction term, it is often… Read More »How to visualize interaction effects

How to center in multilevel models

Ever thought about centering your variables before running an regression based analysis? From my personal experiences with students, chances are high that you haven’t. Although a useful data transformation procedure for many different types of statistical analyses, centering is seldom taught in fundamental statistic courses. Although the mathematical principles behind it may seem arbitrary, its effects on results are oftentimes quite strong. Centering is useful in standard statistical modeling (e.g., OLS regression), but its usefulness… Read More »How to center in multilevel models