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

https://rpsychologist.com
Pinned
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 🧵👇
Reposted by Kristoffer Magnusson
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
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
Reposted by Kristoffer Magnusson
🎉 @rpsychologist.com 's PowerLMM.js is the online statistics application of the year 2025 🎉

powerlmmjs.rpsychologist.com

- Calculate power (etc) for multilevel models
- Examine effects of dropout and other important parameters
- Fast! (Instant results)
October 28, 2025 at 2:37 PM
Reposted by Kristoffer Magnusson
Who’s gonna pay @rpsychologist.com to make a mega tool converting all g*power analysis types to an interpretable web tool like this?
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 3:18 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
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
I watched this so you don’t have to. A couple of highlights:

”I sometimes say that 'screen use', when putting that into statistical models, it’s sort of like looking at 'car use' when trying to find out why injuries are happening from car accidents” 🇳🇴
www.youtube.com/live/XKo6oUY...
Digital media and its impact on children and adolescents – livestreamed Nordic and EU expert meeting
YouTube video by Folkhälsomyndigheten
www.youtube.com
June 5, 2025 at 5:07 PM
Great talk by @jeremylabrecque.bsky.social

"Before and after causal inference: recognizing causal questions and answering them when assumptions are violated"

www.youtube.com/watch?v=9B-X...
2025 CAUSALab Methods Series with Jeremy Labrecque
YouTube video by CAUSALab at Harvard T.H. Chan
www.youtube.com
May 26, 2025 at 1:32 PM
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
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
Reposted by Kristoffer Magnusson
A common sentiment is “I can’t share my code because it’s messy and there might be errors”

But if it’s that untrustworthy, why are you publishing the results it generates?
Folks, always share your code. It doesn’t have to be perfect to be helpful. And if you feel that it’s still too messy or not sufficiently clean to be shared, you shouldn’t submit yet. After all, there could be mistakes in your mess.
May 9, 2025 at 11:11 AM
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
Reposted by Kristoffer Magnusson
This new package for mediation is great! The user interface is *so intuitive* but the unsung hero of this software is the documentation:
May 6, 2025 at 2:53 PM
Reposted by Kristoffer Magnusson
Despite the well-polished workflow of this package, I tried to analyze the “useless data set” that comes with it using {mediation}. Treatment and mediator were (strongly) confounded, so we need to pay close attention to the sensitivity analysis!
May 6, 2025 at 12:39 PM
Reposted by Kristoffer Magnusson
To think that some scientists working in medicine will even brag about not understanding the methods used in the papers they "lead". Like it's beneath them. What a world.
May 6, 2025 at 12:38 PM
Reposted by Kristoffer Magnusson
This is great. It even handles binary and count outcomes appropriately!
🚨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 6, 2025 at 8:14 AM
🚨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
Been reading up on causal prediction – let me know if I’ve got this right:

Clinical prediction: Hard.

Causal inference: Hard.

Causal prediction: Combines the hardest parts of both. Predict outcomes we can’t observe, and evaluate models by making even more assumptions about an unobservable target.
April 28, 2025 at 3:04 PM
Reposted by Kristoffer Magnusson
NEW PAPER: Updated CONSORT-2025 for reporting randomised trials is now available in the @bmj.com @jama.com , @thelancet.bsky.social, @plos.org and @naturemedicine.bsky.social

—> www.bmj.com/content/389/...

#openscience #transparency #medsky #statssky #episky
April 15, 2025 at 5:55 AM
Hear me out, psychologists are the OG vibe coders. Picking factors by squinting at scree plots, naming latent variables on instinct, fitting SEMs based on celestial drawings, and publishing without a care.
The number of researchers in psychology who run "fancy" statistical analyses without having a clue about what they are doing is really disturbing. The fact that editors and reviewers - the supposed experts on these matters - don't pick up on this stuff is even worse. Psychology is hopelessly broken.
April 16, 2025 at 5:35 PM
Reposted by Kristoffer Magnusson
New blog post!

Sometimes, when reviewing a manuscript, it's really unclear to me what precisely the authors are trying to do -- which makes it hard to evaluate the work properly.

So, here's some advice for how to ensure that readers don't get lost.
www.the100.ci/2025/02/17/r...
Reviewer notes: Avoid any ambiguity about analysis aims
For any central statistical analysis that you report in your manuscript, it should be absolutely clear for readers why the analysis is being conducted in the first place – that is, the analysis goal s...
www.the100.ci
February 17, 2025 at 2:04 PM
Reposted by Kristoffer Magnusson
Trying to compile a list of people with active pedagogic interests in teaching statistics go.bsky.app/Qg6YSq6
January 20, 2025 at 4:13 PM