Beyond Spreadsheets — Why R for HTA

Session 1 | R for HTA (Basics) Workshop 2026

RRC-HTA, AIIMS Bhopal | HTAIn, DHR

The Spreadsheet That Shook Nations

2008: The World is on Fire

The global financial crisis had just hit. Governments were debating the biggest economic question of the decade:

Should we spend our way out of the crisis, or cut spending to reduce debt?

Trillions of dollars — and the livelihoods of millions — hung on the answer.

2010: Harvard Economists Provide the Answer

Carmen Reinhart and Kenneth Rogoff published “Growth in a Time of Debt”.

Their finding: countries with public debt above 90% of GDP experience negative economic growth (−0.1% average).

Cited 3,000+ times. A paper that shaped global policy.

Paul Ryan cited it in the US Budget Committee. The European Commission and UK Treasury used it to justify austerity. The IMF referenced it in country recommendations.

What Happened Next

Governments across Europe and the US cut public spending — affecting:

Healthcare budgets — hospital funding reduced, waiting lists grew

Social services — disability support, unemployment benefits cut

Education funding — university fees tripled in England

Research grants — scientific funding stalled across Europe

2013: A Graduate Student Checks the Numbers

Thomas Herndon, a 28-year-old PhD student at UMass Amherst, was given a class assignment:

Pick a famous economics paper and try to replicate its results.

He chose Reinhart-Rogoff. He couldn’t replicate the results.

He emailed the authors. They sent him the spreadsheet.

The Three Errors

Error 1: Excel Row Exclusion

The AVERAGE formula covered rows 30–44 instead of 30–49. Five countries (Australia, Austria, Belgium, Canada, Denmark) were simply left out. A drag-select error — the kind Excel makes invisible.

. . .

Error 2: Unconventional Weighting

New Zealand’s single year of high-debt data (−7.6% growth) was given the same weight as the UK’s 19 years. This one outlier dragged the entire average into negative territory.

. . .

Error 3: Selective Data Exclusion

Post-war data from three countries was excluded without clear justification.

The Corrected Result

−0.1%

ORIGINAL (with errors)

+2.2%

CORRECTED (Herndon et al.)

Growth was POSITIVE, not negative. One spreadsheet error. Billions in policy impact.

Nobody could catch the error earlier — because nobody could audit the spreadsheet.

Five Lessons from Spreadsheet-Gate

  1. Errors hide in plain sight — wrong cell ranges are invisible in Excel
  2. Peer review failed — reviewers couldn’t access or audit the calculations
  3. Replication was impossible — until the original spreadsheet was shared
  4. Policy moved faster than science — the paper was cited before it was checked
  5. Transparency is not optional — it is the only protection

Could This Happen to YOUR HTA Model?

Your cost-effectiveness analysis informs drug pricing, reimbursement, and treatment guidelines.

Can a reviewer trace every calculation in your Excel model?

Can you be certain there is no hidden error in a nested cell reference?

What if there was a better way?

Live Demo: Beyond Spreadsheets

Let me show you what R makes possible — interactively.

Open the Shiny App

🔗 Beyond Spreadsheets — Live Demo

We will explore:

  1. The Reinhart-Rogoff story — interactive error explorer
  2. PSA Demo — 10,000 simulations, cost-effectiveness plane, one click
  3. Markov Model — state transitions with live parameter tuning
  4. CEAC Explorer — acceptability curves at different WTP thresholds
  5. R vs Excel — side-by-side comparison

What You Just Saw

In the Shiny app, everything was:

Reproducible — same seed, same results, every time, anywhere

Auditable — every simulation row visible, every formula transparent

Interactive — change a parameter, see the result immediately

Scalable — 10,000 PSA iterations in a fraction of a second

The entire PSA logic was 3 lines of R. The entire Markov model was 10 lines. Try auditing that in Excel.

The Limitations You Already Know

PSA is painful in Excel — complex macros or VBA; spreadsheet becomes slow and fragile

. . .

Reproducibility is difficult — tracing nested cell references across multiple sheets

. . .

Version control is manual — Model_v3_final_FINAL_revised.xlsx

. . .

Transparency for publication — journals and HTA agencies increasingly require open-source models

. . .

Collaboration is messy — two people cannot work on the same Excel model simultaneously

What R Makes Possible

Reproducible
Your entire analysis is a script — anyone can re-run it and get the same result
Scalable
10,000 PSA iterations in seconds, not hours
Transparent
A reviewer can read your code and see exactly what you did
Version-controlled
Every change tracked, documented, reversible with Git
Free and extensible
No license fees — thousands of packages for health economics

The HTA Workflow in R

Figure 1: The complete modelling workflow

Four Model Types We’ll Cover

Figure 2: HTA model types in this workshop

What This Workshop Will NOT Do

  • Turn you into R programmers in three days
  • Ask you to memorise syntax
  • Expect you to write complex code from scratch

What This Workshop WILL Do

  • Give you working templates you can adapt for your own studies
  • Build confidence in reading and modifying R code
  • Show how to use AI tools to support your workflow
  • Help you understand when R is the right tool

Key Takeaway

R is not replacing your HTA expertise.

. . .

It is giving that expertise a more powerful medium.

. . .

The clinical judgement, model structure, parameter selection — that remains yours.

. . .

R simply makes the execution more reproducible, transparent, and scalable.

. . .

Let us get started.