Kristoffer Magnusson
banner
rpsychologist.com
Kristoffer Magnusson
@rpsychologist.com
Mostly stats, visualization, open science, and psychotherapy.

https://rpsychologist.com
Fun fact about LMMs: when you have missing data, power also depends on the correlation between intercepts and slopes. In the clip, I’m varying the amount of random slope variance.
November 10, 2025 at 2:57 PM
Just added to PowerLMM.js v0.3: Interactive power contour plots!

Visualize how statistical power changes across parameter combinations.

powerlmmjs.rpsychologist.com?view=contour
November 7, 2025 at 4:58 PM
Wasn't that happy with how performance crashed as time points grew, so I dusted off some linear algebra to optimize the calculations. Benchmark showed a ~1Mx speedup using new implementation (with 100 time points) 😅
October 30, 2025 at 4:08 PM
Calculations have been validated against R.

Validation notes: github.com/rpsychologis...
October 28, 2025 at 2:02 PM
Share your analysis as a URL, or store it as a JSON file.

For example:

powerlmmjs.rpsychologist.com?n1=13&time_e...
October 28, 2025 at 2:02 PM
Power analysis summary report, that can be printed or saved as a PDF
October 28, 2025 at 2:02 PM
Hypothesis region visualization. Interactive display of the chosen null and alternative hypothesis.
October 28, 2025 at 2:02 PM
New release of PowerLMM.js! Browser-based power analysis for longitudinal models with dropout.

Now includes:
- Power analysis summary report
- Reproducible & shareable configs (URL/JSON)
- Calculations validated against R
- Hypothesis region visualization

powerlmmjs.rpsychologist.com
October 28, 2025 at 2:02 PM
Sips is always great, I'm hosting my own sessions
June 26, 2025 at 6:53 AM
Turns out proportions aren't collapsible after all. Take that, OR haters.

"Globally, approximately 3.3% of the population reports using AAS, with prevalence rates of 6.4% among men [2] and 4% among women [3]."
June 6, 2025 at 6:49 AM
Not sure where to start with this one. Internet gaming addiction… is a risk factor for internet gaming disorder
May 23, 2025 at 6:29 AM
May 19, 2025 at 6:05 PM
Regarding the expert consensus on smartphone use: let’s not forget that the related “behavioral addiction” gaming disorder, is essentially a copy-paste job.

Below is a visual comparison of the ICD-11 criteria for gaming and gambling disorder—essentially a substitution of terms.
May 19, 2025 at 1:41 PM
I see this a lot in longitudinal analysis—people assume missingness can depend on random effects (like slopes). But those aren’t conditioned on, so that kind of missingness would be non-ignorable (MNAR).
May 6, 2025 at 4:38 PM
🚨New R package! {easymediation}🚨

The *Simplest* and *Most Correct* Way to Do Causal Mediation Analysis

Are you tired of explaining mediation analysis to your colleagues? Just send them this package.

github.com/rpsychologis...
May 5, 2025 at 2:18 PM
Step 1: Say data are MNAR
Step 2: Toss in random values
Step 3: Call it conservative

I’ll definitely adopt this model-free way of handling MNAR, what could go wrong?
May 5, 2025 at 9:05 AM
Amazing observation in a paper: people use smartphones while waiting.

I’ve also observed that people read magazines they’d never touch anywhere else while waiting. Proposing a new disorder: "Compulsive Magazine Reading". Urgent need for intervention programs
May 2, 2025 at 10:08 AM
I take this to mean that none of the included studies evaluated performance with respect to the estimand of interest
April 29, 2025 at 7:02 AM
Added a variogram to the app!

I'm experimenting with showing the non-stationarity of correlations in a random slopes model.
December 20, 2024 at 4:14 PM
Added a simple illustration of group trends to demonstrate what the effect size represents
December 16, 2024 at 6:11 PM
Just deployed some small updates:

More tooltips!

Offloaded the most expensive computations to background threads, and added a cheeky loader for the inevitable scenario where someone tries to inverse huge matrices at 60fps+.
December 13, 2024 at 6:25 PM
You can also view the implied correlation matrix and how the random slopes impact the implied standard deviations at each time point
December 11, 2024 at 10:20 AM
To better understand the random effect parameters, you can view a sample of 20 random slopes adjusted to match the exact variance and correlations specified
December 11, 2024 at 10:20 AM
Dropout can be specified using either a Weibull distribution or manually
December 11, 2024 at 10:20 AM
Introducing PowerLMM.js!

A new tool for power analysis of longitudinal linear mixed-effects models (LMMs) – with support for missing data, plus non-inferiority and equivalence tests.

powerlmmjs.rpsychologist.com

Would really appreciate your feedback as I refine this app! Details below 🧵👇
December 11, 2024 at 10:20 AM