← Latest papers
📊 statistics

Adaptive Gaussian Process Search for Simulation-Based Sample Size Estimation in Clinical Prediction Models: Validation of the pmsims R Package

This paper introduces and validates the `pmsims` R package, which utilizes an adaptive Gaussian process search engine to provide a flexible and computationally efficient framework for simulation-based sample size estimation in clinical prediction models, outperforming existing analytical and non-adaptive methods across diverse outcome types.

Original authors: Oyebayo Ridwan Olaniran, Diana Shamsutdinova, Sarah Markham, Felix Zimmer, Daniel Stahl, Gordon Forbes, Ewan Carr

Published 2026-03-26
📖 5 min read🧠 Deep dive

Original authors: Oyebayo Ridwan Olaniran, Diana Shamsutdinova, Sarah Markham, Felix Zimmer, Daniel Stahl, Gordon Forbes, Ewan Carr

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a chef trying to create the perfect new recipe for a soup that will be served to thousands of people. Before you open a restaurant, you need to know one crucial thing: How many test batches do you need to cook to be sure the soup tastes good?

If you cook too few batches, you might get lucky once, but the recipe could be a disaster for the next 1,000 customers. If you cook too many, you waste time, money, and ingredients.

This is exactly the problem doctors and researchers face when building Clinical Prediction Models (computer programs that predict if a patient will get sick, recover, or how long they might live). They need to know exactly how many patient records (the "test batches") they need to train their model so it works reliably in the real world.

This paper introduces a new tool called pmsims (a piece of software for the R programming language) that solves this problem much better than the old methods. Here is how it works, explained simply:

The Old Way: Guessing and Checking

Previously, researchers had two main ways to figure out the sample size:

  1. The "Textbook Formula" (Analytical): This is like using a rigid recipe card that says, "If you have 10 ingredients, you need exactly 50 test batches."
    • The Problem: Real life is messy. Patients aren't perfect ingredients; they have complex histories and weird correlations. The textbook formula often assumes everything is neat and tidy. When reality gets complicated, this formula gives the wrong answer, leading to models that fail later.
  2. The "Brute Force" Simulation: This is like cooking 100 batches, tasting them, then cooking 101, tasting them, then 102... all the way up to 1,000.
    • The Problem: It works, but it takes forever. It's like searching for a needle in a haystack by checking every single straw one by one. It's accurate but incredibly slow and expensive.

The New Way: The "Smart GPS" (Gaussian Process Search)

The pmsims package introduces a Gaussian Process (GP) search engine. Think of this as a Smart GPS for finding the right sample size.

Instead of checking every single number (1, 2, 3...) or relying on a rigid formula, the Smart GPS does something clever:

  1. It Draws a Map: It cooks a few test batches (say, at 100, 500, and 1,000 patients) and sees how the model performs.
  2. It Predicts the Terrain: Using a mathematical "surrogate model" (a fancy way of saying a smart guesser), it draws a map of what the performance would look like between those points. It knows that if the soup tastes great at 500 and terrible at 100, the "sweet spot" is probably somewhere in between.
  3. It Zooms In: Instead of checking every number, the GPS says, "I'm 90% sure the answer is between 400 and 600. Let's only check those." It ignores the areas where it's already sure the answer isn't.
  4. It Adapts: If the map looks foggy (uncertain), it cooks a few more batches in that specific area to clear the fog. If the map is clear, it moves on.

Why is this a Big Deal?

The researchers tested this new "Smart GPS" against the old "Brute Force" method and the "Textbook Formula" in thousands of different scenarios (predicting heart attacks, recovery times, etc.).

  • It's Faster: Because it skips the numbers it doesn't need to check, it finds the answer using fewer computer calculations. It's like finding the needle in the haystack by using a magnet instead of pulling out every straw.
  • It's More Stable: The old "Brute Force" method sometimes gave wildly different answers depending on how the computer generated the random data. The new GPS method gave consistent, reliable answers every time.
  • It Handles Complexity: Whether the data is simple or a chaotic mess of complex patient history, the GPS adapts. The old formulas broke down when things got complicated.

The "Assurance" Feature

The paper also highlights a feature called "Assurance."

  • The Mean Approach: "On average, this model will work." (Like saying, "If you flip a coin 100 times, you'll get 50 heads.")
  • The Assurance Approach: "We are 80% sure this model will work, even if we get a bit of bad luck." (Like saying, "We are 80% sure you'll get at least 45 heads.")

The pmsims tool can calculate the sample size needed to hit that high-confidence "Assurance" goal, which is much safer for patient care.

The Bottom Line

The authors found that for the best results, you should let the software run about 1,000 simulations (a very manageable number for modern computers) and check the results about 20 times for each step.

In short: The pmsims package is a smart, efficient, and flexible tool that helps researchers stop guessing and start knowing exactly how much data they need to build life-saving medical prediction tools. It replaces the slow, blind search with a smart, guided tour.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →