Publications by Kristoffer Magnusson
Power analysis for longitudinal multilevel models: powerlmm 0.3.0 is now out on CRAN
My R package powerlmm 0.3.0 is now out on CRAN. It can be installed from CRAN https://cran.r-project.org/package=powerlmm or GitHub https://github.com/rpsychologist/powerlmm. New features This version adds support for raw effect sizes, and new standardized effect sizes using the function cohend(...). Here’s an example that use the different typ...
794 sym R (456 sym/1 pcs)
Do you really need a multilevel model? A preview of powerlmm 0.4.0
In this post I will show some of the new simulation features that will be available in powerlmm 0.4.0. You can already install the dev version from GitHub. # GitHub devtools::install_github("rpsychologist/powerlmm") The revamped simulation functions offer 3 major new features: Compare multiple model formulas, including OLS models (no random eff...
6841 sym R (8653 sym/11 pcs) 4 img
Estimating treatment effects and ICCs from (G)LMMs on the observed scale using Bayes, Part 1: lognormal models
When a multilevel model includes either a non-linear transformation (such as the log-transformation) of the response variable, or of the expectations via a GLM link-function, then the interpretation of the results will be different compared to a standard Gaussian multilevel model; specifically, the estimates will be on a transformed scale and not...
17473 sym R (20882 sym/21 pcs) 12 img 6 tbl
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 within-group analyses. Specifically, I will show why it is pointless to try to identify a subgroup of non-responders using a naïve analysis of data from one treatment group only, even though we have weekly meas...
6076 sym R (10560 sym/7 pcs) 6 img
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 extremely strong assumptions required to estimate unbiased effects. My aim with this post is not to show some fancy method that could help reduce bias; rather I just want to present a small simulation-based exa...
7478 sym R (9964 sym/15 pcs) 6 img 2 tbl
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 variances in the treatment and control group. The argument made in these articles is that if individuals differ in their response, then observed variances in the treatment and control group in RCTs should differ. F...
8750 sym R (4674 sym/5 pcs) 6 img 1 tbl