Online Resource 2 — Reproducibility package

"When the record cannot decide: a framework for functional inference in archaeology,
with an application to moai transport"

Journal of Archaeological Method and Theory
Lucas G. Ribeiro and Marcos André Simonssini
Independent Researcher, Uruana de Minas, Minas Gerais, Brazil
Corresponding author: coin26@mail.com

Caption: Analysis code, software environment specification, source-data provenance and
SHA-256 checksums, regenerated numerical outputs, figures, verification suite, and the
log of the clean run from which the submitted figures were produced.

---

# Reproduction package — "When the record cannot decide: a framework for functional inference in archaeology, with an application to moai transport"

Component-diagnostic framework applied to the walking-moai hypothesis.

## One command after obtaining the survey dataset

```bash
bash run_all.sh
```

After the survey dataset has been placed in `data/`, this verifies the three source files, regenerates the principal inferential numbers
(Component A, identification bounds, eye-socket control, Fisher contingency),
and auto-checks the regenerated values against the values asserted in the
manuscript. Exit code 0 means all checks passed.

## What each script does

- `scripts/00_fetch_data.sh` — verifies data files against `checksums.txt` and halts on any missing or altered file. Two of three ship with the package; `MOAI_DATABASE_PUBLIC.xlsx` must be downloaded once (see `data/README_DATA.txt`).
- `scripts/01_component_A.py` — shoulder/base width ratio, road vs platform
  (independent reproduction of the corrected Figure 2).
- `scripts/02_bounds_and_control.py` — Manski (1990) worst-case identification
  bounds for the D-shaped outline (Component B) and the eye-socket positive
  control, plus the exact quarry-subset composition.
- `scripts/03_fisher_contingency.py` — Table 3 Fisher exact tests.
- `scripts/05_component_A_specificity.py` — Component A allometric bench: scale validity, background-allometry null (3 baselines), negative controls (Section 3.5, Table 6).
- `scripts/06_observability_rescue.py` — operational observability signature and identification-rescue frontier (Sections 3.9-3.10).
- `scripts/07_detached_and_C.py` — detached D-shaped statue distances/metadata (Section 3.11) and Component C base-angle summary (Section 3.7); reports distances only, no algorithmic placement verdict.
- `scripts/08_make_figures.py` — regenerates all five figures (PNG + vector PDF) to journal artwork specification: 174 mm canvas, 8 pt minimum lettering, TrueType fonts, no titles inside the illustrations.
- `scripts/09_manuscript_values.py` — consistency check of the principal inferential values against the regenerated JSON outputs.
- `scripts/10_dw_proxy.py` — D/W proxy analysis (Section 3.2).
- `scripts/11_site_clustered.py` — site-clustered robustness for Component A (Section 3.12): site counts and clustered coefficients.
- `scripts/12_specificity_site_sensitivity.py` — site-clustered and context-stratified bootstraps for the candidate-minus-control specificity contrast, equal-weight-per-site analysis, per-trait availability by context with Fisher tests, Hedges' g small-sample correction, and the complete-case limit (Section 3.12).
- `scripts/13_observability_negative_control.py` — negative-control test of the operational observability signature: pre-specified basal, matched-control and broad-control field lists with exclusion rules, statue-clustered bootstrap, difference-in-differences for both stage transitions, leave-one-control-out, per-candidate-field, and complete enumeration of all 118,755 five-field control subsets (Section 3.9; Supplementary Table S1).
- `scripts/14_prospective_and_identity.py` — prospective rescue target list (the 39 road-stage records lacking a recorded basal outline, with site and coordinates), unit-identity sensitivity for the probable duplicate flagged by the source database, and the adversarial coding margin of the eye-socket positive control by exact enumeration (Supplementary Tables S2–S4).
- `scripts/04_verify_manuscript.py` — asserts regenerated values equal the
  manuscript's; prints a PASS/FAIL table.

## Frozen version

This archive corresponds exactly to the submitted manuscript version dated 2026-07-22.
All outputs, figures, and the reproduction log in `outputs/` were regenerated from a
single clean run of the enclosed scripts (`outputs/` emptied, then `bash run_all.sh`),
and the manuscript embeds exactly the figures produced by that run.

`MANIFEST.sha256` lists the SHA-256 of every other file in this archive, so any
substitution after freezing is detectable.

Expected runtime of `run_all.sh` is about 4-5 minutes on a single core (the two
bootstrap modules, 05 and 12, account for most of it). One third-party dataset must be obtained first (see `data/README_DATA.txt`); after that the pipeline requires no network access at any point.

## Data sources (two independent datasets, never merged at the object level)

Two of the three data files (both CC BY 4.0) are **redistributed in this package**.
The third, `MOAI_DATABASE_PUBLIC.xlsx`, is licensed **CC BY-NC-SA 4.0 and is not
redistributed here**: its NonCommercial term is not clearly compatible with
distribution as supplementary material of a commercially published article, and no
separate permission was sought. Download it once from
<https://orb.binghamton.edu/anthropology_fac/34/>, place it in `data/`, and run
`00_fetch_data.sh`, which verifies all three files against `checksums.txt` and halts
on any missing or altered file. See `data/README_DATA.txt` for the full record.

1. **Survey database** — `MOAI_DATABASE_PUBLIC.xlsx`, Hochstetter, Rapu Haoa,
   Lipo & Hunt (2011), *Latin American Antiquity* 22(3):385–397, distributed via
   The Open Repository @ Binghamton, Anthropology Faculty Scholarship 34,
   <https://orb.binghamton.edu/anthropology_fac/34/>, **CC BY-NC-SA 4.0**.
   *Not redistributed here*; obtain once and place in `data/`. Used for Component B
   and the eye-socket control.
2. **Van Tilburg morphometrics** — `data/VanTilburgData.xlsx`, Van Tilburg (1986),
   as distributed and error-corrected by Lipo & Hunt (2025), Zenodo
   10.5281/zenodo.17329904 / github.com/clipo/moai_walking, **CC BY 4.0**.
   Redistributed here under CC BY 4.0 with attribution; used for Component A.
3. **Combined road-moai table** — `data/all_moai_combined.csv`, from the same
   Lipo & Hunt (2025) repository, **CC BY 4.0**. Redistributed with attribution;
   provides the base-angle degrees and the `public_objectid` join key.

No statue is matched across the two datasets; they use different identifiers
(OBJECTID vs. Van Tilburg quad-site-statue numbers) with no documented crosswalk.

## Environment

See `requirements-lock.txt`. Tested with Python 3.12.
The negative-control bootstrap (reported in the specificity bench) resamples objects and recomputes the candidate-minus-control difference of mean |d| values, with a fixed seed; see the script header.

## Integrity

`checksums.txt` holds SHA-256 hashes of the data files used to produce the
reported numbers. `outputs/reproduction_log.txt` is the full log of the clean run.

## Outputs

`outputs/` contains the regenerated JSON tables, the five manuscript figures
(fig_generic = Figure 1, fig_gate0 = Figure 2, fig_bounds = Figure 3, fig_dag = Figure 4, fig_rescue = Figure 5), and the
reproduction log.
