PSPrem P. SinghPlant scientist · Data scientist
Methods That Travel
Causal mediation

Is It the Heat, or the Virus?

Split one biological signal into direct and virus-mediated routes, then test the same model on 63 years of crop data.

August 4, 2026 · 2 min read

Illustrated guide showing how causal mediation separates a response into direct and mediator-driven paths
One-page visual summaryOpen full size
61.8%Via virusMBF1c response
39GenesSignificant mediators
97.2%Via landSugarcane trend
2,000BootstrapsUncertainty test
Case file 01Vineyard mystery

Which route fits?

Heat · virus · gene response

Heat?Vine response

Choose a route to reveal the split.

Two routes, one response

RouteModel path
Through the virusHeat acts through viral titer before reaching the gene response
DirectHeat acts directly on the gene response
How the split is calculated

The analysis fits M ~ X and Y ~ X + M. The indirect effect is abab; the direct effect is cc'. Their ratio gives the mediated share.

I used 2,000 bootstrap resamples to estimate uncertainty.

Vineyard result

  • MBF1c: 61.8% through virus · 38.2% direct
  • Gene screen: 39 mediators / 2,000 genes

61.8% describes MBF1c—not every heat response in the vineyard.

Same method, new scale

Role in the modelGrapevine studyFarming re-application
Starting variableSeasonal temperatureYear
Possible go-betweenViral titerHarvested area
Measured outcomeGene expressionCrop production
Case file 02The method goes travelling

More farmland or better harvests?

63 years · 10 crops · one route split

Which crop was most land-driven?

1961–2023

Sugarcane

Expansion dominated

Nearly all of the modeled production trend travelled through expansion of harvested area.

4.50×

production

3.01×

harvested area

Modeled route split

97.2%

through harvested area

Bootstrap interval
86.0110.8%

97% land
Through harvested area Remaining direct pathway

Modeled global trends—not causal proof.

Crop comparison

Growth-route portfolio

Different crops reached growth through very different routes

Sugarcane’s modeled trend was almost entirely land-driven; rice growth was dominated by the productivity route.

Sugarcane97.2% via land
Land expansion
Maize72.8% via land
Land expansion
Cassava59.8% via land
Land expansion
Productivity route
Banana48.6% via land
Land expansion
Productivity route
Rice12.5% via land
Productivity route
Harvested-area routeRemaining direct route
Source: FAOSTAT world totals, 1961–2023. Shares come from observational mediation models with 2,000 bootstrap resamples; they are not causal proof.
Evidence detail
CropVia harvested areaBootstrap intervalRemaining route
Sugarcane97.2%86.0–110.8%2.8%
Maize72.8%66.4–78.9%27.2%
Cassava59.8%51.9–69.0%40.2%
Banana48.6%22.3–78.8%51.4%
Rice12.5%5.5–23.0%87.5%

When the split breaks

Growth strategy matrix

More output did not always require more land

Potato, barley, and wheat produced more while using roughly the same or less land; soybean combined the strongest production and land expansion.

Soybean

Production 13.80× · Land 5.78×

Efficient

Sugarcane

Production 4.50× · Land 3.01×

Land-led

Wheat

Production 3.57× · Land 1.07×

Efficient

Potato

Production 1.43× · Land 0.77×

Efficient
Source: FAOSTAT world totals, 1961–2023. Values compare the final year with 1961 and describe global observational trends.
Evidence detail
CropProduction growthArea growthInterpretation
Tomato6.72×3.04×Output outpaced land
Soybean13.80×5.78×Output outpaced land
Sugarcane4.50×3.01×Land-intensive growth
Maize6.04×2.00×Output outpaced land
Cassava4.77×3.44×Land-intensive growth
Banana6.09×2.79×Output outpaced land
Rice3.73×1.46×Output outpaced land
Wheat3.57×1.07×Output outpaced land
Potato1.43×0.77×More output, less land
Barley1.97×0.84×More output, less land
SignalCrops
Land route exceeds totalSoybean · Tomato
Land route opposes trendWheat
More output, less landPotato · Barley
Limits of the comparison

The crop analysis separates observational trends; it does not prove that land change caused production change. Breeding, irrigation, policy, trade, and region also changed over time. Mediation shows how a modeled effect divides—it cannot choose the causal story by itself.

Watch the method

See the signal split

Two short videos

Method overview1:16
Text alternative

A visual introduction to causal mediation. One response is separated into a direct path and an indirect path that travels through a mediator, using the vineyard heat-virus-gene question and the crop land-production comparison.

Splitting a trend1:23
Text alternative

A step-by-step visual explanation of the signal split, the roles of the starting variable, mediator, and response, and why bootstrap uncertainty and causal caution are necessary when interpreting the result.

How this was done

Every figure and number on this page is produced by the linked code.

RCausal mediationBootstrap uncertaintyLinear modelingggplot2FAOSTAT bulk data

Built for

Grapevine Red Blotch Virus transcriptomics, UC Davis

Re-applied to

FAOSTAT world crop production, 1961-2023

Reproducible code

View analysis code