Non-randomized comparisons are common in RCTs. In this post I show some examples of confounding and collider bias, using treatment adherence as an example. I present a small simulation study that show that common regression models used in clinical psychology, makes little sense, and that Bayesian instrumental variable regression can be easily fit using the R package brms.

Read more
In this post I compare the performance of Amazon EC2 instances vs my HP workstation and my MacBook Pro, when doing Monte Carlo simulations.

Read more
Over the summer I've been working on finishing my new R package 'powerlmm', which is now almost complete. It provides flexible power calculations for typical two- and three-level longitudinal linear mixed models, with unbalanced treatment groups and cluster sizes, as well as with missing data and random slopes at both the subject and cluster-level.

Read more
This post explains how Cohen's d relates to the proportion of overlap between two normal distributions, and why I use a different measure then Cohen in my Cohen's d visualization.

Read more
This visualization illustrates the appropriate tests to use when your research hypothesis is that two treatments are equally effective, or that a new treatment is no worse than the current gold standard.

Read more
The visualization illustrates a Bayesian two-sample t test

Read more
I've added more options to my NHST visualization

Read more
My p-curve visualization has been updated with the option to log the x-axis.

Read more
This visualization shows how the t-distribution and the Gaussian (normal) distribution approaches each other when sample size increases.

Read more
I often get asked about how to fit different longitudinal models in lme/lmer. In this post I cover several different two-level, three-level and partially nested models.

Read more