Martin Modrák's Avatar

Martin Modrák

@modrakm.bsky.social

Biostatistics/bioinformatics at Charles University, 2nd faculty of Medicine. Bayesian in practice, but not a fan of Bayesian epistemology. Main on fedi: https://bayes.club/@modrak_m Blog: https://martinmodrak.cz

1,253 Followers  |  36 Following  |  173 Posts  |  Joined: 14.02.2024  |  1.9762

Latest posts by modrakm.bsky.social on Bluesky

I am doing a short workshop in this symposium (quoted below) for folks in and around Leipzig. Here's the abstract. I really indulged myself with this one.

A Guerilla Approach to Scientific Workflow:

04.02.2026 12:05 — 👍 61    🔁 12    💬 3    📌 2
Simulation Based Calibration for Bayesian models SBC helps perform Simulation Based Calibration on Bayesian models. SBC lets you check for bugs in your model code and/or algorithm that fits the model. SBC focuses on models built with Stan <https://m...

A shameless plug of the SBC R package that tries to make the development cost of doing SBC as low as possible hyunjimoon.github.io/SBC/

04.02.2026 16:44 — 👍 1    🔁 0    💬 1    📌 0

No worries, just thought the recommendations in the paper look a bit too bleak. Also, wouldn't winner’s curse be also amenable to modelling as truncation?

03.02.2026 07:50 — 👍 1    🔁 0    💬 1    📌 0

First, love this. Second, shouldn't there be a modelling solution to this that lets you keep the first study in (and handle sign alignment)? E.g. treating the first study as folded normal. Might help people who fear "loosing power" by removing the study...

03.02.2026 05:31 — 👍 1    🔁 0    💬 1    📌 0

As far as I'm aware, this is the first time anyone has shown that innocuous data-dependent reporting practices can bias meta-analyses (please let know if I'm wrong!), so we should be very careful interpreting big metascientific meta-analyses going forward. 9/x

02.02.2026 14:56 — 👍 9    🔁 2    💬 1    📌 0

Hello friends. I'm looking for an existing SOP describing how CTUs deal with database lock when a blinded RCT is followed by an open label extension study where all patients can be offered the active tx once their planned follow-up in the RCT completes. Thanks! #clinicaltrials

02.02.2026 20:34 — 👍 3    🔁 3    💬 1    📌 0
  The decline effect (Protzko & Schooler, 2017) is an observed phenomenon where effect sizes in experiments apparently diminish in size from the first paper demonstrating the effect to later replications. This has been taken as a symptom of an unhealthy scientific ecosystem, possibly caused by the "winner's curse" (selection on significance and regression to the mean), publication bias or opportunistic analyses. I show that decline effects can arise as an artifact from a much simpler source: the original article determining the sign of the effect in a meta-analysis. Moreover, such artifactual decline effects will show correlations with some of the same experimental properties that one would expect from biases from poor behavior, such as the sample size of the original study.

The decline effect (Protzko & Schooler, 2017) is an observed phenomenon where effect sizes in experiments apparently diminish in size from the first paper demonstrating the effect to later replications. This has been taken as a symptom of an unhealthy scientific ecosystem, possibly caused by the "winner's curse" (selection on significance and regression to the mean), publication bias or opportunistic analyses. I show that decline effects can arise as an artifact from a much simpler source: the original article determining the sign of the effect in a meta-analysis. Moreover, such artifactual decline effects will show correlations with some of the same experimental properties that one would expect from biases from poor behavior, such as the sample size of the original study.

New draft: "Decline effects, statistical artifacts, and a meta-analytic paradox". In this manuscript I show how a common practice in meta-analysis (eg the 2015 Open Science Collaboration) creates artifactual signatures of poor scientific behavior. PDF: raw.githubusercontent.com/richarddmore... 1/x

02.02.2026 14:56 — 👍 66    🔁 25    💬 5    📌 3

It's a beautiful plot, but it's terribly misleading about the impact of pre-registration. More recent studies (with higher sample sizes) find very little impact of pre-registration on the publication of null results.

Here's a thread with some references (1/N)

02.02.2026 13:47 — 👍 21    🔁 8    💬 5    📌 2

Another possible reason for this could be different versions of BLAS/LAPACK across machines (was once bitten by this). sessionInfo() reports this so easy to check

02.02.2026 04:53 — 👍 2    🔁 0    💬 0    📌 0

IMHO the underlying problem is that the standard (simpler) formulation of multinomial logistic is sensitive to category orderings. There are ways to reformulate the model to make the ordering irrelevant. I tried to give some links to lit in an answer... discourse.mc-stan.org/t/problem-in...

30.01.2026 16:13 — 👍 2    🔁 0    💬 0    📌 0
Preview
Problem in multilevel (hierarchical) multinomial logistic regression (with brms) I have posted a teaser of the issue at my blog, copied below. The data The predicted variable is a categorical response, named resp with levels ‘1’, ‘2’, ‘3’, and ‘4’ (nominal labels, not numerical...

#rstats bat signal:

If any of y'all have experience with multilevel multinomial logistic regression, with {brms}, Kruschke and I could use your help. This is your chance to influence the upcomming textbook. discourse.mc-stan.org/t/problem-in...

30.01.2026 15:02 — 👍 33    🔁 17    💬 4    📌 1
**Part 1: From Bayesian inference to Bayesian workflow**

1. Bayesian theory and Bayesian practice
2. Statistical modeling and workflow
3. Computational tools
4. Introduction to workflow: Modeling performance on a multiple choice exam

**Part 2: Statistical workflow**

5. Building statistical models
6. Using simulations to capture uncertainty
7. Prediction, generalization, and causal inference
8. Visualizing and checking fitted models
9. Comparing and improving models
10. Statistical inference and scientific inference

**Part 3: Computational workflow**

11. Fitting statistical models
12. Diagnosing and fixing problems with fitting
13. Approximate algorithms and approximate models
14. Simulation-based calibration checking
15. Statistical modeling as software development

**Part 1: From Bayesian inference to Bayesian workflow** 1. Bayesian theory and Bayesian practice 2. Statistical modeling and workflow 3. Computational tools 4. Introduction to workflow: Modeling performance on a multiple choice exam **Part 2: Statistical workflow** 5. Building statistical models 6. Using simulations to capture uncertainty 7. Prediction, generalization, and causal inference 8. Visualizing and checking fitted models 9. Comparing and improving models 10. Statistical inference and scientific inference **Part 3: Computational workflow** 11. Fitting statistical models 12. Diagnosing and fixing problems with fitting 13. Approximate algorithms and approximate models 14. Simulation-based calibration checking 15. Statistical modeling as software development

**4. Case studies**

16. Coding a series of models: Simulated data of movie ratings
17. Prior specification for regression models: Reanalysis of a sleep study
18. Predictive model checking and comparison: Clinical trial
19. Building up to a hierarchical model: Coronavirus testing
20. Using a fitted model for decision analysis: Mixture model for time series competition
21. Posterior predictive checking: Stochastic learning in dogs
22. Incremental development and testing: Black cat adoptions
23. Debugging a model: World Cup football
24. Leave-one-out cross validation model checking and comparison: Roaches
25. Model building and expansion: Golf putting
26. Model building with latent variables: Markov models for animal movement
27. Model building: Time-series decomposition for birthdays
28. Models for regression coefficients and variable selection: Student grades
29. Sampling problems with latent variables: No vehicles in the park
30. Challenge of multimodality: Differential equation for planetary motion
31. Simulation-based calibration checking in model development workflow

**Appendices**

A. Statistical and computational workflow for Bayesians and non-Bayesians
B. How to get the most out of Bayesian Data Analysis

**4. Case studies** 16. Coding a series of models: Simulated data of movie ratings 17. Prior specification for regression models: Reanalysis of a sleep study 18. Predictive model checking and comparison: Clinical trial 19. Building up to a hierarchical model: Coronavirus testing 20. Using a fitted model for decision analysis: Mixture model for time series competition 21. Posterior predictive checking: Stochastic learning in dogs 22. Incremental development and testing: Black cat adoptions 23. Debugging a model: World Cup football 24. Leave-one-out cross validation model checking and comparison: Roaches 25. Model building and expansion: Golf putting 26. Model building with latent variables: Markov models for animal movement 27. Model building: Time-series decomposition for birthdays 28. Models for regression coefficients and variable selection: Student grades 29. Sampling problems with latent variables: No vehicles in the park 30. Challenge of multimodality: Differential equation for planetary motion 31. Simulation-based calibration checking in model development workflow **Appendices** A. Statistical and computational workflow for Bayesians and non-Bayesians B. How to get the most out of Bayesian Data Analysis

Bayesian Workflow by
Andrew Gelman, Aki Vehtari, @rmcelreath.bsky.social with @danpsimpson.bsky.social, @charlesm993.bsky.social, @yulingy.bsky.social, Lauren Kennedy, Jonah Gabry, @paulbuerkner.com, @modrakm.bsky.social, @vianeylb.bsky.social

(in production, estimated copy-editing time 6 weeks)

26.01.2026 08:18 — 👍 158    🔁 31    💬 3    📌 4
Preview
Zeynep Tufecki on having the wrong nightmares about generative AI I was writing a blog post where I was going to reference Zeynep Tufecki’s 2025 NeurIPS keynote, and realized there isn’t a solid synopsis online.

Wrote a summary of a great keynote by @zey.bsky.social at NeurIPS, arguing that we’re having the wrong nightmares about AI: not AGI or superhuman benchmarks, but good-enough genAI at scale threatens "load bearing frictions" society relies on to signal effort, authenticity, sincerity, credibility.

09.01.2026 16:42 — 👍 81    🔁 26    💬 2    📌 1

Very, very, slight preference for positive.

08.01.2026 06:37 — 👍 2    🔁 0    💬 0    📌 0
Side-by-side comparison of two multi-panel bubble charts faceted by world region. The left column shows the default facet labels placed above each panel (“Africa”, “Americas”, “Asia”, “Europe”, “Oceania”). The right column shows the same charts, but the facet labels are moved inside each panel at the top-left using a negative margin. In the center, there is a title reading “Want to place your facet labels inside each panel?” with an arrow pointing right, followed by a short ggplot2 theme code snippet demonstrating how to move strip text inside the panel.

Side-by-side comparison of two multi-panel bubble charts faceted by world region. The left column shows the default facet labels placed above each panel (“Africa”, “Americas”, “Asia”, “Europe”, “Oceania”). The right column shows the same charts, but the facet labels are moved inside each panel at the top-left using a negative margin. In the center, there is a title reading “Want to place your facet labels inside each panel?” with an arrow pointing right, followed by a short ggplot2 theme code snippet demonstrating how to move strip text inside the panel.

I ignored the strip.clip argument in #ggplot2 for way too long 😲

Combined with a small negative margin tweak, you can place facet labels inside each panel. A tiny trick that makes small multiples feel so much cleaner.

🔵 no manual coordinates
🔵 inherits theme styling
🔵 scales nicely when resizing

12.12.2025 12:51 — 👍 238    🔁 40    💬 7    📌 4

You can see some of these stereotypes - the simple, morally pure countryside vs. the morally compromised, inauthentic city - play out in Greek and Roman literature.

So this is a very old idea that recurs regularly.

01.01.2026 19:24 — 👍 1119    🔁 159    💬 39    📌 9

Czechia has this.

02.01.2026 11:42 — 👍 0    🔁 0    💬 0    📌 0
Figure 1: The Rothman-Dahly Evidence Pyramid (original version)

An equilateral triangle with a small blue section labelled "Thoughtful, well-conducted studies of any design" at the top, with the remaining space colored red and labelled "The other shit"

Figure 1: The Rothman-Dahly Evidence Pyramid (original version) An equilateral triangle with a small blue section labelled "Thoughtful, well-conducted studies of any design" at the top, with the remaining space colored red and labelled "The other shit"

‪It has a name now 😜

Many thanks to Ken for agreeing to put his good name to my...artwork. The image is in the public domain (CC 0), but citations to the linked documents are warmly welcomed.

✅ zenodo.org/records/1808...

✅ pubmed.ncbi.nlm.nih.gov/24452418/

29.12.2025 11:19 — 👍 224    🔁 75    💬 9    📌 12

I'd like to propose the following norm for peer review of papers. If a paper shows clear signs of LLM-generated errors that were not detected by the author, the paper should be immediately rejected. My reasoning: 1/ #ResearchIntegrity

28.12.2025 06:23 — 👍 115    🔁 27    💬 4    📌 6

We have weirdly benefitted from the fact that all the 2010s data science boom Medium posts littering the training corpus were so consistently terrible.

18.12.2025 02:10 — 👍 18    🔁 2    💬 2    📌 0

Violin plots?

17.12.2025 16:11 — 👍 0    🔁 0    💬 0    📌 0

Interpeting individual coefficients is definitely a problem in such models, but I think the interpretation challenge can be overcome with things like estimated marginal means/g-computation so I don't think that's necessarily an argument against complex models per se.

12.12.2025 14:06 — 👍 4    🔁 0    💬 0    📌 0
StanCon 2026 registration and abstract submission are now open | Statistical Modeling, Causal Inference, and Social Science

StanCon 2026 registration and abstract submission are now open
statmodeling.stat.columbia.edu/2025/12/11/s...

11.12.2025 13:46 — 👍 5    🔁 2    💬 0    📌 0

This could be very useful for R -> InkScape and R -> Illustrator workflows! #rstats

See the vignette: cran.r-project.org/web/packages...

11.12.2025 14:50 — 👍 28    🔁 3    💬 0    📌 0
course schedule as a table. Available at the link in the post.

course schedule as a table. Available at the link in the post.

I'm teaching Statistical Rethinking again starting Jan 2026. This time with live lectures, divided into Beginner and Experienced sections. Will be a lot more work for me, but I hope much better for students.

I will record lectures & all will be found at this link: github.com/rmcelreath/s...

09.12.2025 13:58 — 👍 658    🔁 236    💬 12    📌 20

There's actually a pretty decent body of literature on checklists in medicine,air travel and few other domains and the summary is AFAIK that checklists help for highly constrained tasks, but may be counterproductive in more open-ended scenarios.

10.12.2025 19:28 — 👍 3    🔁 0    💬 0    📌 0

You will be visited by 3 spirits

09.12.2025 21:36 — 👍 6    🔁 0    💬 0    📌 0

You will be visited by 3 spirits

09.12.2025 16:29 — 👍 41    🔁 7    💬 1    📌 1

A possible scenario: calculate means and sds on original scale -> round to 0.01 -> multiply the rounded values to change units

04.12.2025 07:59 — 👍 1    🔁 0    💬 0    📌 0

as awful as this is, these examples kinda make me feel giddy and validated, given how i normally feel about our current peer review practices. my personal experience unfortunately has never been consistent with academics' general regard of peer review as a net benefit despite its flaws.

28.11.2025 17:14 — 👍 41    🔁 7    💬 2    📌 0

@modrakm is following 19 prominent accounts