Welcome to Kristoffer Magnusson's blog about


Articles with the statistics tag

Estimating treatment effects and ICCs from (G)LMMs on the observed scale using Bayes, Part 1: lognormal models

In this post I show how to make marginal inferences on the untransformed scaled when using multilevel models with a non-linear transformation applied to the dependent variable (a log-transformation is used as an example). Cluster-specific versus population-average (conditional versus marginal) effects are compared using both average effects on the untransformed scale and using relative (multiplicative) effects.

Read more

Introducing 'powerlmm' an R package for power calculations for longitudinal multilevel models

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