Clinical prediction models in jamovi

A practical introduction to developing, validating and updating clinical prediction models, with worked examples for the clinpred jamovi module.

A clinical prediction model turns what is known about a patient today (age, sex, blood pressure, a biomarker) into a probability: the risk of having a disease now (diagnostic) or of developing an event later (prognostic). Building one is easy; building one that works in the next patients is not. The model is fitted to the data it is evaluated on, so its apparent performance flatters it; it can be miscalibrated in another hospital or period; and a long list of candidate predictors invites overfitting. This tutorial follows the workflow that the TRIPOD+AI guideline (Collins et al. 2024) and the textbooks (Steyerberg 2019) recommend, and shows each step with the clinpred module for jamovi.

What the module does

clinpred adds a Prediction menu with four analyses:

Analysis Outcome Model
Binary Outcome (Logistic) event / no event logistic regression
Continuous Outcome (Linear) a measurement linear regression
Time to Event (Cox) time + event, risk by a horizon Cox regression
Validate a Published Model any of the three read from a file

The three development analyses share the same panel and results: predictors (linear, splines, factors, interactions), selection (baseline covariates, stepwise, elastic net), missing data, performance (discrimination, calibration, overall, clinical utility), internal validation (bootstrap, cross-validation), validation in new data (a split of the data or an external file), model updating, sample size, and explanation (effects, importance, SHAP). Every table can carry plain-language notes (Explanations).

How to read this tutorial

Every table and plot in the worked examples is computed by the module’s own code, so it is what jamovi shows with the same options. The folded R syntax under each example is the equivalent call from R (clinpred::cpLogistic(...)), useful for reproducing a result outside jamovi.

The example data

The examples use a simulated heart cohort of 2400 patients, available in jamovi’s Data Library (☰ → Open → Data Library → Clinical Prediction Models) and here as heart_cohort.omv. It is simulated, so the true model is known: age acts non-linearly, the excess risk of men falls with age (an age × sex interaction), body mass index has some missing values, and the later recruitment period has a slightly lower baseline risk. Each patient has three outcomes:

Outcome Analysis What it is
event10 (no / yes) Logistic cardiovascular event within 10 years (369 events, 15.4%)
sbp1y Linear systolic blood pressure one year later
time, status Cox follow-up in years and whether the event happened

Predictors: age, sex, smoking (never / former / current), sbp (systolic blood pressure), chol (cholesterol), bmi, diabetes; centre (A, B, C) and period (2012–2016, 2017–2019) describe where and when the patient was recruited.

An external cohort of 1,000 patients from another population, heart_external.csv, is used for external validation. It has the problems real files have: columns named with other capitals, levels spelled differently, unknown categories and values beyond the development range.

Installing the module

clinpred needs jamovi 28.4 or later (the current series). Download the .jmo file for your computer from the releases page and, in jamovi, choose Modules (⊕) → Sideload. The analyses appear under Prediction. The options, tables and plots are available in English, Spanish and Catalan, following jamovi’s language setting.

Back to top

References

Collins, Gary S, Karel G M Moons, Paula Dhiman, et al. 2024. “TRIPOD+AI Statement: Updated Guidance for Reporting Clinical Prediction Models That Use Regression or Machine Learning Methods.” BMJ 385 (April): e078378. https://doi.org/10.1136/bmj-2023-078378.
Steyerberg, Ewout W. 2019. Clinical Prediction Models: A Practical Approach to Development, Validation, and Updating. In Statistics for Biology and Health. Springer International Publishing. https://doi.org/10.1007/978-3-030-16399-0.