Kristoffer Magnusson

PhD, Lic. Clinical Psychologist

Hi, I'm Kristoffer, a postdoctoral researcher in clinical psychology. This is my personal page about R, statistics, psychotherapy, open science, and data visualization.

Blog Posts

Why linear mixed-effects models are probably not the solution to your missing data problems


Linear mixed-effects models are often used for their ability to handle missing data using maximum likelihood estimation. In this post I will…

Heterogeneous treatment effects and homogeneous outcome variances


Recently there has been a couple of meta-analyses investigating heterogeneous treatment effects by analyzing the ratio of the outcome…

Mediation, confounding, and measurement error


Mediation might be the ultimate example of how a method continues to be used despite a vast number of papers and textbooks describing the…

Change over time is not "treatment response"


This will be a non-technical post illustrating the problems with identifying treatment responders or non-responders using inappropriate…

New paper: The consequences of ignoring therapist effects in longitudinal data analysis


We just published a paper, The consequences of ignoring therapist effects in trials with longitudinal data: A simulation study , where we…


Interactive Visualizations

Since 2014 I've created various interactive tools to teach statistics.

Maximum Likelihood

Cohen's d

Statistical Power and Significance Testing

Confidence Intervals

Bayesian Inference


Equivalence and Non-Inferiority Testing

P-value distribution


R Software

powerlmm: Power Analysis for Longitudinal Multilevel Models

The purpose of powerlmm is to help design longitudinal treatment studies (parallel groups), with or without higher-level clustering (e.g. longitudinally clustered by therapists, groups, or physician), and with missing data.