Interactive companion to Constraints on the interpretation of atmospheric potential
gradient anomalies associated with earthquakes: Evidence from Peru and Argentina
— Romero et al. (2026).
This simulator reproduces the statistical framework of Section 4.3 of the paper. It generates
synthetic earthquake-centered PG' data with parameters matched to the observed CAS / ICA
backgrounds and shows how the Wilcoxon signed-rank test combined with BH-FDR correction
detects (or fails to detect) injected anomalies of varying amplitude, duration, and lag.
Quick orientation.
Each row of the heatmap = one earthquake (n events total). Each column = one relative day
from −90 to +15 (106 days). The colour shows the event-level daily median PG' (red = positive,
blue = negative). The Wilcoxon test runs independently at each of the 106 days.
Day 0 is highlighted because it is the focal lag in the precursor literature, but a real
anomaly at any day would be flagged.
1. Controls
117
14.0
42
0.0
-2
3
100
0.05
Run a simulation to see results.
2. Heatmap (events × relative day)
3. Composite day-level median + Wilcoxon significance
4. −log10(p) per day with FDR threshold
5. How to interpret
Composite day-level median (panel 3, dark line): median of event-level
daily medians across all events, computed independently at each relative day.
Red shading = pre-seismic window [−15, 0]. Vertical dashed line = day 0.
Stars on composite: days where Wilcoxon FDR-corrected q < alpha.
These are the only "reliable" anomalies. Uncorrected p < alpha
(without FDR) is shown as smaller dots — about 5 such days are expected by chance
across 106 tests under the null.
Panel 4: −log10(p_raw). Horizontal lines = uncorrected α and FDR threshold.
A real anomaly produces a tall narrow spike at the affected lags; null produces
scattered low bars.
The MDE for n=117 with sigma=14 is approximately 4 V/m. Try Preset 2 (−5 V/m): may or
may not survive FDR depending on duration. Preset 3 (−15 V/m): always survives.
6. Pedagogical exercises
Run Preset 1 (null): confirm that q < 0.05 occurs at zero or very few days
(false positives). Repeat with different seeds — the false-positive count fluctuates.
Run Preset 2 (weak pre-seismic): at amplitude near MDE the FDR may or may not
catch the anomaly. Increase amplitude until detection becomes consistent.
Run Preset 3 (strong pre-seismic): detection is now robust. Try lowering the
"fraction of events showing anomaly" — what fraction is needed for detection?
Run Preset 4 (single-day shift): a brief 1-day shift is detectable if amplitude
is high enough. Try varying the shift amplitude to find the practical detection threshold.
Try a positive amplitude to confirm the test is two-sided.
Set duration = 30 days at amplitude = −2 V/m: a sustained but small shift may be
detected by FDR even though no single day is dramatic.
Connection to Section 4.3 of P04_EQK: in our real CAS / ICA data, no
configuration showed FDR-significant day 0 across 20 stratified subsets. This simulator
shows you what a real signal would have looked like.